Hello,

I'm having a problem in bash 3.1 that I'm pretty sure is a bug. As
indicated in the subject, the HISTCMD variable always returns 1 when
used in PROMPT_COMMAND , rather than the actual number of the current
line in the history. This only occurs in 3.1, not in 3.0/3.0.16 (all
three downloaded from the gnu.org bash site and compiled on my debian
unstable system).

This demonstrates the problem clearly enough:

[EMAIL PROTECTED]/0:~/src$ bash-3.1/bash
[EMAIL PROTECTED]/0:~/src$ PROMPT_COMMAND='echo P_C ${HISTCMD}'
P_C 1
[EMAIL PROTECTED]/0:~/src$ echo NORMAL: $HISTCMD
NORMAL: 8168
P_C 1
[EMAIL PROTECTED]/0:~/src$ exit
[EMAIL PROTECTED]/0:~/src$ bash-3.0.16/bash
[EMAIL PROTECTED]/0:~/src$ PROMPT_COMMAND='echo P_C ${HISTCMD}'
P_C 8167
[EMAIL PROTECTED]/0:~/src$ echo NORMAL: $HISTCMD
NORMAL: 8168
P_C 8168

Should it matter, my .bashrc is at http://xyx.nl/~arjen/bashrc.txt

Please CC any questions to me, I'm not on the list.

Arjen


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to