Ramblings

October 12, 2009

BASH command line history

Filed under: cool, linux, tip, tool — michaelangela @ 4:16 pm

Sweet. The page has more tips as well like getting partial stuff from your history. I don’t know how much of this will work on OSX but it’s still neat to see.

Access to command line history in BASH

To activate those two commands, add this to your .bashrc file:

bind ‘”\e[A”‘:history-search-backward
bind ‘”\e[B”‘:history-search-forward

Now you can easily summon any command from the history by typing the command and pressing Up arrow. You might continue pressing Up arrow until you find the command instance you wish to execute again.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: