3 ms·
I have shortcuts to save last (sl) executed command and another to grep that file. alias sl='fc -ln -1 | sed "s/^\s*//" >> ~/.saved_commands.txt' alias
by asicsp 6y ago
I have shortcuts to save last (sl) executed command and another to grep that file.
alias sl='fc -ln -1 | sed "s/^\s*//" >> ~/.saved_commands.txt'
alias slg='< ~/.saved_commands.txt grep'
You can also add a comment to the command before saving. For ex:
$ foo_cmd args #this command does this awesome thing
$ sl