[aklug] Re: Tip Jar: Search through bash history

From: captgoodnight captgoodnight <captgoodnight@hotmail.com>
Date: Sun Feb 01 2015 - 19:31:26 AKST

Hi All,
 
I'll chime in.
 
I have this in my /etc/inputrc
 
Control-h: "history \C-m"

This allows a quick history via a ctrl-h in Konsole (here...).
 
I then do a,
 
~/Documents$ !(command number from history)
 
to rerun the command from history.
 
Here's a link to some other goodies.
 
http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history/
 
Back to lurking.
Cheers!
Eddie
 
> Date: Sun, 1 Feb 2015 18:33:07 -0900
> From: tim@akwebsoft.com
> To: aklug@aklug.org
> Subject: [aklug] Re: Tip Jar: Search through bash history
>
> * Mike <alaskabarsalou@gmail.com> [150201 13:00]:
> >
> > For the longest time when using bash, I've used the up arrow key to
> > get to previous commands. This had gotten tiring, so I searched out a
> > way to find a previous command without having to hit up arrow so many
> > times.
> >
> > I found this article:
> > http://ruslanspivak.com/2010/11/20/bash-history-reverse-intelligent-search/
> >
> > The basic idea is you can press CTRL-R and then start typing the
> > command you are looking for.
> >
> >
> > For example, if it was a git command, you can type:
> >
> > CTRL-R git
> >
> > Then it will look backwards through your history to find the most
> > recent git command.
> >
> > If you hit CTRL-R during that, it will find the one before that.
> >
> > Give it a try!! It is really nice way to go back in time!
> >
> > Also, if things seem a little wonky, you can hit CTRL-G and you will
> > be back to normal.
> Thanks. That is one of the best tips I've had in ages!
> --
> Tim
> tim at tee jay forty nine dot com or akwebsoft dot com
> http://www.akwebsoft.com, http://www.tj49.com
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
                                               
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Feb 1 19:32:03 2015

This archive was generated by hypermail 2.1.8 : Sun Feb 01 2015 - 19:32:03 AKST