Expand complicated lines before hitting the dreaded enter
- Alt+Ctrl+e — shell-expand-line (may need to use Esc, Ctrl+e on your keyboard)
- Ctrl+_ — undo
- Ctrl+x, * — glob-expand-word
$ echo !$ !-2^ * Alt+Ctrl+e
$ echo aword someotherword * Ctrl+_
$ echo !$ !-2^ * Ctrl+x, *
$ echo !$ !-2^ LOG Makefile bar.c foo.h
&c.