🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #1135

Bug report (!!:p strange behavior)

#1135
From: Kayvan Sylvan
Date: Thu, 11 Jan 1990 20:12
53 lines
2107 bytes
Bash 1.04.5 on Xenix 2.3.2 running on Everex Step/25 (intel386).

I went to use the "!!:p" history recalling feature.
I have "alias hi=history" in my .bash_aliases.

I also have history_control=ignoredups (which seems to work *after*
the first duplicate entry is entered into the history - Is this
intentional?).

I was doing this from within Emacs (Outside Emacs, the difference
seems to be that the command "!!:p" or "!num:p" is re-echoed at each
prompt).

	bash:529$ : Testing bash history recall
	bash:530$ hi 3
	  528  hi 10
	  529  : Testing bash history recall
	  530  hi 3
	bash:531$ !529:p
	: Testing bash history recall

So far so good. Now I just hist return.

	bash:531$ 
	: Testing bash history recall
	bash:531$ 
	: Testing bash history recall
	bash:531$ 
	: Testing bash history recall
	bash:531$ 

At this point I hit C-c C-c within Emacs to get the shell to stop
echoing. If I type something in at this point, It would get it appended
to the line that is being echoed. (Outside of Emacs, a simple C-u
clears the line). The history number gets changed now to 535.

	bash:535$ hi 7
	  529  : Testing bash history recall
	  530  hi 3
	  531  : Testing bash history recall
	  532  : Testing bash history recall
	  533  : Testing bash history recall
	  534  : Testing bash history recall
	  535  hi 7
	bash:536$ 

It seems that the ignoredups variable had no effect in this case.

This whole sequence was somewhat confusing the first time I ran into
it (within Emacs) since there was no indication that the "!529:p" was
still being acted on upon subsequent RET or newlines.

			---Kayvan
Technical Details
Message-ID: <m0gmB9Y-0000atC@mrspoc.transact.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!tut.cis.ohio-state.edu!mrspoc.transact.com!kayvan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!tut.cis.ohio-state.edu!mrspoc.transact.com!kayvan
From: kayvan@mrspoc.transact.com (Kayvan Sylvan)
Newsgroups: gnu.bash.bug
Subject: Bug report (!!:p strange behavior)
Message-ID: <m0gmB9Y-0000atC@mrspoc.transact.com>
Date: 11 Jan 90 20:12:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 53