GNU nano 2.0.7 File: /tmp/bash-fc-30782221326 # begin writing some exceedingly long and complex command in the editor...
Next time you are using your shell, try typing
ctrl-x ctrl-e # in emacs mode
or
<ESC> v # in vi mode
The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR. Then you can edit at leisure using all the powerful macros and commands of vi, emacs, nano, or whatever.
Show Sample Output
* in bash-shell You can capture the current commandline to a text-editor: * simply press: CTRL+x+e * Your current commandline will pe put into Your default text-editor (export EDITOR=vim)
Allows you to edit your command using your chosen editor. Works in bash with "set -o vi".
export VISUAL=vi
man ls????? ????? ???? ???
man ls????? ???? ?? 3 ???
man ls??? ????? ????
man ls???? ??? ???? ? ????? ????
man ls????? ???? ?? ????
man ls???? ????? ???? ??????
man ls????? ???? ?? ?? ????
man ls???? ??????? ????? ????
man ls????? ???? ???? ?????
man ls????? ???? ?? 3 ???
man ls????? ???? ?????
man ls????? ????? ???? ???
man ls????? ???? ??? ? ???? ?? ??????
man ls????? ??? ?? ?? ?????
man ls????? ???? ??? ?? ?? ????
man ls????? ???? ??? ?? ????
man ls????? ??? ?? ??
man ls????? ??? ?? ?????
man ls????? ????? ???? ??? ?? ?? ????
????? ????? ???? ???
????? ???? ?? 3 ???
??? ????? ????
???? ??? ???? ? ????? ????
????? ???? ?? ????
???? ????? ???? ??????
????? ???? ?? ?? ????
???? ??????? ????? ????
????? ???? ???? ?????
????? ???? ?? 3 ???
????? ???? ?????
????? ????? ???? ???
????? ???? ??? ? ???? ?? ??????
????? ??? ?? ?? ?????
????? ???? ??? ?? ?? ????
????? ???? ??? ?? ????
????? ??? ?? ??
????? ??? ?? ?????
????? ????? ???? ??? ?? ?? ????