Article View: gnu.bash.bug
Article #602problems with !
From: Brian Fox
Date: Fri, 15 Sep 1989 18:08
Date: Fri, 15 Sep 1989 18:08
36 lines
1749 bytes
1749 bytes
Posted-Date: Fri, 15 Sep 89 09:10:13 NDT
From: Jeff Sparkes <elroy!ames!cs.utexas.edu!stretch.cs.mun.edu!jeff1@csvax.caltech.edu>
Date: Fri, 15 Sep 89 09:10:13 NDT
Rob McMahon writes:
> In article <429@stretch.MUN.EDU> you write:
> >bash-1.03 on a sun4 - sunos4
> >
> >The first is that history expansion takes place even when ! is in quotes,
> >either single or double. ...
> >$ echo "!ls"
> >ls": Event not found.
>
> This is a feature, and the same as csh. It can be useful in things like
>
> echo "!$"
>
However, notice that it says ls" not found. The quote
stripping is not done correctly.
Compared to what? Do you have an example of history expansion that
works "correctly"?
History expansion is purely textual excepting the cases of counting
arguments to the last command. In that case, the line is split into
separate words in the same fashion as the shell, and that includes
quoted strings.
In the case of searching for a string with `!string' quoting is
unrelated. However, I concede that the above example stresses the
inadequacies of !-style history expansion in general. Perhaps a special
case could be made for just this circumstance.
Brian Fox
Technical Details
Message-ID:
<8909151808.AA26910@aurel.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfoxReferences:
<89Sep15.114226ndt.65635@stretch.cs.mun.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug Subject: problems with ! Message-ID: <8909151808.AA26910@aurel.caltech.edu> Date: 15 Sep 89 18:08:35 GMT References: <89Sep15.114226ndt.65635@stretch.cs.mun.edu> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 36