I’m using bind -x in vi-command mode to remap a keyboard character to a direct bash command, which in my case alters the current line (cd ..
). Is there a way to at the same time map with -x AND execute the inbuilt redraw-current-line
command?
So this is what I have:
bind -m vi-command -x '"-": "cd .."'
This works halfway, then I tried this:
bind -m vi-command -x '"-": "cd .."'` "-":redraw-current-line
But this doesn’t work, I think the whole command is now flawed and readline goes back to the custom shortkey for -
which is to scroll history. Is there a workaround for this?