Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ginosko!uunet!garfield!stretch!jeff1 From: jeff1@garfield.mun.edu (Jeff Sparkes) Newsgroups: gnu.bash.bug Subject: Re: problems with ! Message-ID: Date: 17 Sep 89 09:04:06 GMT References: <89Sep15.114226ndt.65635@stretch.cs.mun.edu> <8909151808.AA26910@aurel.caltech.edu> Sender: news@stretch.MUN.EDU Distribution: gnu Organization: Memorial University of Newfoundland Lines: 61 In-reply-to: bfox@AUREL.CALTECH.EDU's message of 15 Sep 89 18:08:35 GMT In article <8909151808.AA26910@aurel.caltech.edu> bfox@AUREL.CALTECH.EDU (Brian Fox) writes: Path: stretch!garfield!uunet!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug 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 Posted-Date: Fri, 15 Sep 89 09:10:13 NDT From: Jeff Sparkes 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"? 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. Compared to the csh example that Rob mailed me. Csh stripped the quotes. Maybe it is better to do ! expansion on whitespaced words, much the same a tilde expansion. Instead of passing the entire line off to history, just pass the "proper" word. Programs other than bash can choose to hand entire lines off to history. Script started on Sun Sep 17 10:02:34 1989 -docboy- echo ~ /users/cs/staff/jeff1 -docboy- echo "~" ~ -docboy- exit script done on Sun Sep 17 10:02:41 1989 -- Jeff Sparkes jeff1@garfield.mun.edu || uunet!garfield!jeff1