2 ms·
Tip for "set -o vi" users: when you have issued a long multiline command and your line wrapping isn't working very well, Esc-k until you get to the command and
by noisy_boy 10y ago
Tip for "set -o vi" users: when you have issued a long multiline command and your line wrapping isn't working very well, Esc-k until you get to the command and then press v - this will open your command in vi and you can now edit it more easily. Quitting with :wq will execute your command.
- dllthomas 10y agoStrictly it will open your command in $EDITOR, but if you've "set -o vi" that's probably vi/vim/neovim. Outside vi mode, C-x C-e does the same thing. It's "edit-and-execute-command" in readline. Incidentally, this really does what it says on the tin: if you use "read -e" to enable readline support at a prompt, and you try to edit what you're inputting this way, it won't pass the result into the read - it will try to execute it.