Ctrl x e
This feature is absolutly amazing. Next time you have a long command line at your shell prompt, hit the following key strokes:
Ctrl + x + e
This should execute the program defined with $EDITOR
and edit a temporary file which contains your long command line. From here
you are able to change the contents of the command while using your powerful and preferred editor (excluding VSCode). Once you have
made your changes to the command, save the changes and quit the invocation of the editor to return the results back to your terminal
prompt where you have the option to hit Return and execute the command. How cool is that?
Here is an example:
$ docker run \
-p 8080:8080 \
-e AWS_PROFILE=Dev \
-v "$PWD:/app" really-long-image/app:0.0.1"
Ctrl + x + e
Make your changes! Write and quit!
$ docker run \
-p 8080:8080 \
-e AWS_PROFILE=Dev \
-v "$PWD:/appname" really-long-image/appname:0.0.1"