6 ms·
Press alt and dot (full stop) to insert last word from the previous command line: $ cat file $ grep stuff alt-. Alternatively, make use off the READNU
by neuromanser 3y ago
Press alt and dot (full stop) to insert last word from the previous command line:
$ cat file
$ grep stuff alt-.
Alternatively, make use off the READNULLCMD mechanism in Zsh:
$ < file
translates to
$ ${READNULLCMD:-more} < file
Thus you can
$ < file
then UP (or ctrl-p which I find more ergonomic) and continue with "grep stuff":
$ < file grep stuff
(Redirections can be anywhere in the command.)
https://zsh.sourceforge.io/Doc/Release/Redirection.html#Redirections-with-no-command https://zsh.sourceforge.io/Doc/Release/Redirection.html#Redi...