Arjen Meek wrote:
> 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. 

It's not a bug.  Bash-3.1 returns the history position as the value
of HISTCMD only when it's actually saving commands on the history list
(which non-interactive execution like PROMPT_COMMAND evaluation has
never done).  Bash-3.0 returned essentially random values when it
wasn't saving commands to the history, as long as HISTSIZE was set.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live Strong.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


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

Reply via email to