Replies: 2 comments 5 replies
-
|
It feels possible, but I can only offer a few thoughts in that direction. Hopefully somebody who knows better comes along and shows the way more concisely. In my config I do something similar where Ctrl+T does something different based on a trailing space:
Here's the code that does that: https://github.com/MatrixManAtYrService/configs/blob/f9c19d4663ac25a1b52a7d3948aea1a582c61094/home-manager/config/nushell/config.nu#L793 You can see the valid keycodes and modifiers like this: One way would be to use modifier: none
keycode: space
event: [
{
send: ExecuteHostCommand
cmd: "commandline edit ( ...And then you'd write something which evaluates to a space if the output of In my case, I pipe the output of {
name: search_history
modifier: control
keycode: char_q
mode: [emacs, vi_normal, vi_insert]
event: { send: searchhistory }
}With An alternative approach would be to avoid summoning the history picker from inside {
name: move_right_or_take_history_hint
modifier: control
keycode: char_f
mode: emacs
event: {
until: [
{ send: historyhintcomplete }
{ send: menuright }
{ send: right }
]
}
}But I'm not sure what it takes to register custom events. I think you'd want something like this: |
Beta Was this translation helpful? Give feedback.
-
|
Take a look at atuin, maybe you can use that instead of the internal history picker. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to bind
spaceto open history menu when pressed at the start of the line and insert space normally otherwise.Beta Was this translation helpful? Give feedback.
All reactions