It's rare that I learn a new cli shortcut, but here's a cool one I just learned today from the This Week in Self-Hosted (1 March 2024) newsletter.

When you are typing in a shell, you can press CTRL+x+e and $EDITOR will open with your current command as the text. You can then edit that command using your favorite editor, save the file, and the command on the shell will be replaced with the new version of what was in that file.

Example:

ctrl-e-x-til