Last Updated: February 25, 2016
·
614
· alhafoudh

How to edit long bash command

When writing long bash command that could use some indentation, just press CTRL+X CTRL+E which will open the current command in your $EDITOR. After saving and quitting the editor, the content is pulled back to bash.

1 Response
Add your response

Don't forget the other "readline" meta keys, such as CTRL-A and CTRL-E that move you to the begining and end of the line.

over 1 year ago ·