3 ms·
Never knew that shortcut, useful!
by crtasm 3y ago
Never knew that shortcut, useful!
- godelski 3y agoI only recently learned of it myself despite being on nix for over a decade and reading many advanced bash shortcut blogs. IDK why it isn't well known. For zsh users see here: https://nuclearsquid.com/writings/edit-long-commands/ https://nuclearsquid.com/writings/edit-long-commands/ Note: this can be tricky depending on where it goes in your zshrc. If you use a plugin manager (like Sheldon) then this should be above that. I ended up with this and it works well on OSX and linux autoload -U edit-command-line # Emacs style (<C-x><C-e>) zle -N edit-command-line # make sure `set -o vi` is above this line bindkey '^xe' edit-command-line bindkey '^x^e' edit-command-line # (VIM) Use visual mode bindkey -M vicmd v edit-command-line