You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement equivalent to ZSH's zle accept-line for better integration with atuin #11065
Seems like someone could add commandline --accept or some such thing. There's also options to look at reedline's send events to see if you can send an enter after a commandline update.
As one additional detail, for atuin it would need to be usable from within a keybinding. I know that sometimes keybindings have their own quirks so I'm just calling that out in case it applies here in Nushell.
@sholderbach from what i've looked at, executehostcommand will run things like fzf and put the output on the command line but not execute the returned results. Maybe I'm mistaken, but I thought the OP was looking for a way to execute the item that gets put on the command line buffer.
I think this is going to have to be a change in reedline. This is what I've tried without success.
Creating keybindings with these events after commandline has run.
submit event
submitornewline event
enter event
pipeline with (char -i 13) in it
There's something that's preventing anything from running after commandline. I'd also add that I don't really like how commandline runs as it creates a new command line and doesn't update the existing one. That should be fixed too.
Ugh, I also found another bug in commandline where it only correctly uses --cursor-end the first time.
I think this is going to have to be a change in reedline. This is what I've tried without success.
Creating keybindings with these events after commandline has run.
1. submit event
2. submitornewline event
3. enter event
4. pipeline with (char -i 13) in it
There's something that's preventing anything from running after commandline. I'd also add that I don't really like how commandline runs as it creates a new command line and doesn't update the existing one. That should be fixed too.
Ugh, I also found another bug in commandline where it only correctly uses --cursor-end the first time.
that certain something was that event::read()? that blocks without checking the event queue. In my PR I added a check, if the event queue is not empty before blocking.
Activity
fdncred commentedon Nov 15, 2023
Seems like someone could add
commandline --acceptor some such thing. There's also options to look at reedline'ssendevents to see if you can send an enter after a commandline update.arcuru commentedon Nov 15, 2023
As one additional detail, for atuin it would need to be usable from within a keybinding. I know that sometimes keybindings have their own quirks so I'm just calling that out in case it applies here in Nushell.
sholderbach commentedon Nov 15, 2023
Does the
event: executehostcommandfit the bill for that? This would not add to the internal history but allow execution based on a keybinding?fdncred commentedon Nov 15, 2023
@sholderbach from what i've looked at, executehostcommand will run things like fzf and put the output on the command line but not execute the returned results. Maybe I'm mistaken, but I thought the OP was looking for a way to execute the item that gets put on the command line buffer.
ellie commentedon Nov 16, 2023
That's correct - we'd need a way for the keybinding to immediately execute the result in the buffer
This would be the same (functionally) as
zle accept-linefor zshfdncred commentedon Nov 16, 2023
I think this is going to have to be a change in reedline. This is what I've tried without success.
Creating keybindings with these events after commandline has run.
There's something that's preventing anything from running after commandline. I'd also add that I don't really like how commandline runs as it creates a new command line and doesn't update the existing one. That should be fixed too.
Ugh, I also found another bug in commandline where it only correctly uses --cursor-end the first time.
mrdgo commentedon Aug 29, 2024
that certain something was that
event::read()?that blocks without checking the event queue. In my PR I added a check, if the event queue is not empty before blocking.feat: `commandline edit --accept` to instantly execute command (#16193)
sholderbach commentedon Aug 17, 2025
Closed by #16193