[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PS1 \# doesn't take into account HISTIGNORE and HISTCONTROL
From: |
Chet Ramey |
Subject: |
Re: PS1 \# doesn't take into account HISTIGNORE and HISTCONTROL |
Date: |
Thu, 2 Jun 2016 10:34:07 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
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
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/