Re: selective command history

2010-09-19 Thread suvayu ali
On 18 September 2010 14:09, Cameron Simpson wrote: > On 17Sep2010 16:30, suvayu ali wrote: > | Thanks Cameron. This was very helpful. I also save my history to a > | separate file with timestamps. But I did not have a easy way of > | searching it. Hence my question. With what you suggest things w

Re: selective command history

2010-09-18 Thread Cameron Simpson
On 17Sep2010 16:30, suvayu ali wrote: | Thanks Cameron. This was very helpful. I also save my history to a | separate file with timestamps. But I did not have a easy way of | searching it. Hence my question. With what you suggest things will | become a lot simpler. You can get grepall here: ht

Re: selective command history

2010-09-18 Thread Suvayu Ali
On Saturday 18 September 2010 04:40 AM, Aaron Konstam wrote: > Ok, maybwe we have reached an impass. I did run . .bash_profile and did > not see your described behavior. > This is what I see. > $ HISTCONTROL=ignorespace > $ echo $HISTCONTROL > ignorespace > $ ls -d */ > bin/ codebaby/ f

Re: selective command history

2010-09-18 Thread Aaron Konstam
On Fri, 2010-09-17 at 16:28 -0700, suvayu ali wrote: > On 17 September 2010 13:24, Aaron Konstam wrote: > > Let us get specific: > > You are saying if I insert the following line in .bash_profile > > ^ > This might be

Re: selective command history

2010-09-17 Thread suvayu ali
On 17 September 2010 13:55, Cameron Simpson wrote: > On 17Sep2010 13:23, suvayu ali wrote: > | On 17 September 2010 12:45, Andy Blanchard wrote: > | > Can you boil the commands that you don't want included in the history > | > file to a series of regular expressions such as the following: > | >

Re: selective command history

2010-09-17 Thread suvayu ali
On 17 September 2010 13:24, Aaron Konstam wrote: > Let us get specific: > You are saying if I insert the following line in .bash_profile ^ This might be the reason. If you set that in your ~/.bash_profile then you woul

Re: selective command history

2010-09-17 Thread Cameron Simpson
On 17Sep2010 13:23, suvayu ali wrote: | On 17 September 2010 12:45, Andy Blanchard wrote: | > Can you boil the commands that you don't want included in the history | > file to a series of regular expressions such as the following: | > | >   ^cd | >   ^ls | >   ^rm | > | > If so, you can create a

Re: selective command history

2010-09-17 Thread Aaron Konstam
On Fri, 2010-09-17 at 11:54 -0700, suvayu ali wrote: > Hi everyone, > > Found it! > > On 17 September 2010 11:47, suvayu ali wrote: > >> Set HISTIGNORE to 'ignorespace' and prefix any commands you want to > >> ignore with a space. > >> > > > > That didn't work for me either. :( > > > > Set HIST

Re: selective command history

2010-09-17 Thread suvayu ali
On 17 September 2010 12:45, Andy Blanchard wrote: > Can you boil the commands that you don't want included in the history > file to a series of regular expressions such as the following: > >   ^cd >   ^ls >   ^rm > > If so, you can create a list of these regular expressions in a file, > then use t

Re: selective command history

2010-09-17 Thread Andy Blanchard
Can you boil the commands that you don't want included in the history file to a series of regular expressions such as the following: ^cd ^ls ^rm If so, you can create a list of these regular expressions in a file, then use the ~/.bash_logout script to clean up the history: # clean up

Re: selective command history

2010-09-17 Thread suvayu ali
On 17 September 2010 11:54, suvayu ali wrote: > Set HISTCONTROL to "ignorespace" to achieve the above. :) > > And if you want to ignore duplicate entries, then you can use > "ignoredupes". To choose both simultaneously, use "ignoreboth". > I spoke too soon. this does the same as explicitly listin

Re: selective command history

2010-09-17 Thread suvayu ali
Hi everyone, Found it! On 17 September 2010 11:47, suvayu ali wrote: >> Set HISTIGNORE to 'ignorespace' and prefix any commands you want to >> ignore with a space. >> > > That didn't work for me either. :( > Set HISTCONTROL to "ignorespace" to achieve the above. :) And if you want to ignore du

Re: selective command history

2010-09-17 Thread suvayu ali
Hi Simon, On 17 September 2010 05:22, Simon Andrews wrote: > On 17/09/2010 00:46, suvayu ali wrote: >> My use case is, to be able to use up arrow or be able to search >> through my history with C-r for all the commands I type. But I want to >> ignore the trivial day to day use commands to be igno

Re: selective command history

2010-09-17 Thread Aaron Konstam
On Fri, 2010-09-17 at 13:22 +0100, Simon Andrews wrote: > On 17/09/2010 00:46, suvayu ali wrote: > > Hi everyone, > > > > I wanted to have different command history for my interactive bash > > session and the history that is written in my bash_history file. Does > > anyone have any idea how to achi

Re: selective command history

2010-09-17 Thread Simon Andrews
On 17/09/2010 00:46, suvayu ali wrote: > Hi everyone, > > I wanted to have different command history for my interactive bash > session and the history that is written in my bash_history file. Does > anyone have any idea how to achieve that? > > My use case is, to be able to use up arrow or be able

Re: selective command history

2010-09-17 Thread Suvayu Ali
Hi, On Friday 17 September 2010 03:52 AM, Yorvyk wrote: >> My use case is, to be able to use up arrow or be able to search >> through my history with C-r for all the commands I type. But I want to >> ignore the trivial day to day use commands to be ignored when the >> history is written to the

Re: selective command history

2010-09-17 Thread Yorvyk
On Thu, 16 Sep 2010 16:46:08 -0700 suvayu ali wrote: Hi > Hi everyone, > > I wanted to have different command history for my interactive bash > session and the history that is written in my bash_history file. Does > anyone have any idea how to achieve that? > > My use case is, to be able to us

selective command history

2010-09-16 Thread suvayu ali
Hi everyone, I wanted to have different command history for my interactive bash session and the history that is written in my bash_history file. Does anyone have any idea how to achieve that? My use case is, to be able to use up arrow or be able to search through my history with C-r for all the c