2 ms·
> and I’ve come across more than one paid professional who doesn’t use the “up” key to retrieve the previous command. Well. I prefer ctrl-p personally, but I t
by yjftsjthsd-h 2y ago
> and I’ve come across more than one paid professional who doesn’t use the “up” key to retrieve the previous command.
Well. I prefer ctrl-p personally, but I take your point:)
- brigandish 2y agoI'm a `!!` man.
- curun1r 2y agoEspecially since it fits nicely into a mental model that includes !*, !^, !$, !-2 and such. ^something^somethingelse is also useful. And the sudo !! pattern is something I do even when I realize that I need root ahead of time. There’s something about hitting enter on a command that makes me realize I’ve made a mistake, so doing that before I’ve granted root permissions is helpful. Up/ctrl-p are more awkward to use this way.
- brigandish 2y agoI also like typing `!:` (in zsh) and hitting tab and getting some helpful hints: $ !: & -- repeat substitution A -- as ':a', then resolve symlinks P -- realpath, resolve '..' physically Q -- strip quotes a -- absolute path, resolve '..' lexically c -- PATH search for command e -- leave only extension g -- globally apply s or & h -- head - strip trailing path element l -- lower case all words p -- print without executing q -- quote to escape further substitutions r -- root - strip suffix s -- substitute string t -- tail - strip directories u -- upper case all words x -- quote words, breaking on whitespace
- fiddlerwoaroof 2y agoI do <Esc>k
- TacticalCoder 2y ago[dead]