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: Thu, 2 Jun 2016 20:43:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

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 prefer to enter just "!-3:2" than "!4563:2", cause I think is way more intuitive.


Cheers

El 02/06/16 a las 16:34, Chet Ramey escribió:
On 6/2/16 6:38 AM, Carlos Morata wrote:
Hi,

I'm using Fedora 22 and  4.3.42(1)-release.
The issue is that \# prompt variable doesn't take into account the value of
HISTIGNORE and HISTCONTROL.
It's not supposed to.  The `command number' is a count of the commands
entered during the current shell session.  If you want something that
reflects the current position in the history list, use `\!'.  There is
language in the man page that reflects this.

Chet





reply via email to

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