One Thing Well

A weblog about simple, useful software.

You can follow along on Twitter or via the feed. Don't hesitate to get in touch. Sponsor the site.

!something:p

A handy command line titbit:

!something

will issue the last command that matches “something”.

If your short term memory is as bad as mine, this can be a bit dangerous. So I always do

!something:p

first, which prints the last matching command without running it.

See also

This works in bash, tcsh, and zsh; I’m not sure about other shells.