3 ms·
Seventy-five to one hundred percent of the author's complaints are addressed by the `fc` command and I'm surprised it hasn't been mentioned yet. Fc opens $EDITO
by kelseyfrog 4y ago
Seventy-five to one hundred percent of the author's complaints are addressed by the `fc` command and I'm surprised it hasn't been mentioned yet. Fc opens $EDITOR and upon exiting executes the saved contents. It's great for editing a complex command, but perhaps a tad obscure.
- Arnavion 4y agoAlso bash supports Ctrl-X + Ctrl-E to open $EDITOR to edit the current prompt.
- quesera 4y agoIn vi mode (i.e. after "set -o vi") in bash or zsh, you can open $EDITOR on the current prompt contents with: Esc, then v
- davesmylie 4y agocertainly pretty obscure. I'd been mucking around in shells for 20+ years before I found it. Now it's part of my core set of commands used constantly.
- frankjr 4y agoIf using iTerm2, you can also press Shift+Cmd+. and it will open a small window/prompt where you can type your command while still interacting with the terminal.
- deleted 4y ago[deleted]
- bitwize 4y agoM-x shell in Emacs also covers most of the complaints. Galaxy brain: M-x eshell. Use regular Emacs commands from the shell! Define functions in Emacs Lisp, use them as shell commands!