Repository navigation
feat: immediately accept - #15092
feat: immediately accept#15092mrdgo wants to merge 22 commits into
Conversation
Example use case: atuin
There was a problem hiding this comment.
lgtm. i'll mark this as draft until we get the reedline changes in so we don't accidentally merge it before then, but we should be good to go after that (and ci green of course, but i think it's failing right now because of the reedline patch. not sure)
|
this is merged on the reedline side now (sorry about the delay!), @mrdgo could you fix the clippy and the merge conflicts? thanks 😄 |
Thanks for the reedline merge! Apparently, rustfmt decides differently on my setup and sorts imports differently. However, now this should be ready to go. |
|
The jobs fail because of a timeout downloading musl. Some server down? Edit: I can download the lib on my laptop. Maybe gh actions is blocked from musl.cc? |
|
Is this fine? Otherwise, any ideas on how to fix the |
|
I am really confused about the Clippy WASM issue, can anyone of the maintainers give me some guidance? |
I think the issue is related to adding reedline as a dependency to |
|
Also, I wanted to note that @sholderbach and I were talking a bit about the API changes to reedline for this and we'd really like the To prevent this breaking change, we were thinking that instead of an |
|
Thanks for the feedback! I can implement that, though I will need to find some spare time. Luckily, I didn't delete the branch on my fork. So feel free to revert the change in reedline and I will ping you when there is a non-breaking implementation :) |
|
thanks so much! really appreciate it 😄 |
# Description Fixes - #11065 Revised - #15092 Depends on - nushell/reedline#933 Adds the `--accept` flag to the `commandline` command, to immediately accept the input. Example use case: atuin # User-facing changes Users get the ability to pass `--accept` or `-A` to `commandline edit` in order to immediately execute the resulting commandline. # Tests + Formatting I added two test cases that execute `commandline edit -A`. There is also some documentation about their unintuitive expectations output. # After Submitting The [docs](https://www.nushell.sh/commands/docs/commandline_edit.html) can be updated to the new flag: --accept, -A: immediately execute the command (no additional return required) > [!NOTE] > > This PR will be revised if / when nushell/reedline#933 is accepted # Demo [](https://asciinema.org/a/Ql4r1oWu8J0C4MecmIZjxw5Pg)
|
Thanks for pushing that issue forward, has since been superseded by #16193 |
Description
Implemented as a boolean value that is stored in
engine_stateand passed to thereedline.get_lineinvocation.User-facing changes
Users get the ability to pass
--acceptor-Atocommandline editin order to immediately execute the resulting commandline.Tests + Formatting
I added two test cases that execute
commandline edit -A.There is also some documentation about their unintuitive expectations output.
After Submitting
The docs can be updated to the new flag:
--accept, -A: immediately execute the command (no additional return required)