Thursday, August 31, 2006

Linux: On-the-fly BASH Aliases with Cntl-R

If you use BASH, I hope you make use of Cntl-R to search for commands you've already executed. Even though I know about and use Cntl-R, even I underuse it. For instance, you can use Cntl-R to create on-the-fly, short-lived aliases. Start with:
cd /some/long/path # cdlongpath
Then later:
<Cntl-R>cdlongpath
It will autocomplete to your earlier command. If you happen to forget an alias, no big deal :)

No comments: