Article View: gnu.bash.bug
Article #46history numbers are wrong
From: Brian Fox
Date: Wed, 21 Jun 1989 16:16
Date: Wed, 21 Jun 1989 16:16
34 lines
1593 bytes
1593 bytes
From: roland@ai.mit.edu (Roland McGrath) Date: Wed, 21 Jun 89 12:59:59 JST The history number displayed by \# in PS1 does not correspond to the numbers used in ! history references or the `history' builtin. The numbers given by \# start at 1 with each bash invocation, while the real history numbers start at the beginning of .bash_history. The number display by \# is not the history number. Here is some text from FEATURES: Here is the comment next to the decode_prompt_string function. /* Return a string which will be printed as a prompt. The string may contain special characters which are decoded as follows: \t the time \d the date \n CRLF \s the name of the shell \w the current working directory \u your username \h the hostname \# the command number of this command \<octal> character code in octal \\ a backslash */ It appears that more than one person wants the behaviour of "\!" in csh. However, I have been wondering about other possible ways of handling prompt strings, including standard word evaluation of it. Brian
Technical Details
Message-ID:
<8906211616.AA00297@aurel.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfoxReferences:
<8906210400.AA08380@hobbes.ai.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug Subject: history numbers are wrong Message-ID: <8906211616.AA00297@aurel.caltech.edu> Date: 21 Jun 89 16:16:06 GMT References: <8906210400.AA08380@hobbes.ai.mit.edu> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 34