bug-bash
[Top][All Lists]
Advanced

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

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


From: Carlos Morata
Subject: PS1 \# doesn't take into account HISTIGNORE and HISTCONTROL
Date: Thu, 2 Jun 2016 12:38:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

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.

Steps to reproduce (* when wrong)
==============
$bash --norc
bash-4.3$ PS1="C:\#>"
C:2>HISTIGNORE="history *"
C:3>HISTCONTROL=ignoredups
C:4>echo 4
4
C:5>history 4
   87  PS1="C:\#>"
   88  HISTIGNORE="history *"
   89  HISTCONTROL=ignoredups
   90  echo 4
*C:6>echo !-5:0
echo older command
older command
C:7>repeat
bash: repeat: no se encontrĂ³ la orden
C:8>repeat
bash: repeat: no se encontrĂ³ la orden
C:9>repeat
bash: repeat: no se encontrĂ³ la orden
C:10>echo !-1:0
echo repeat
repeat
*C:11>echo !-2:0
echo echo
echo
==========

I don't know if it is intented or a bug. I solved it with few lines of bash and show my own command number than \# on PS1.


Cheers




reply via email to

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