bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PS1 \# doesn't take into account HISTIGNORE and HISTCONTROL


From: Carlos Morata
Subject: Re: PS1 \# doesn't take into account HISTIGNORE and HISTCONTROL
Date: Mon, 6 Jun 2016 19:03:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

Hi,

Ok I got it, lesson learnt. :)

Thank for your time and cheers. :)

El 06/06/16 a las 04:13, Chet Ramey escribió:
On 6/2/16 2:43 PM, Carlos Morata wrote:
Hi,

I think you misunderstod me.
I'm really interested in working with relative command history expasions.
So I need to work with !-$((\#-cmdnumbertarget)), not with !$HISTCMD.

I figure it out pretty well already but I think this is a bug cause you
loose all the relative history expansions when you hit HISTCONTROL or
HISTIGNORE and that doesn't get well with the principle of least surprise.
I'm not sure I understand.  If you turn on options and variables that
affect which commands are saved in the command history and how they are
saved (or affect the history list when they are saved, like erasedups),
it seems reasonable to expect that to affect the history number.

If you want the history list to reflect exactly the commands you enter,
unset HISTCONTROL and HISTIGNORE.  That way you can use something like
"!-3" with more confidence.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]