Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: