Article View: gnu.bash.bug
Article #606problems with !
From: Brian Fox
Date: Sun, 17 Sep 1989 16:21
Date: Sun, 17 Sep 1989 16:21
65 lines
2232 bytes
2232 bytes
Date: 17 Sep 89 09:04:06 GMT
From: garfield!stretch!jeff1@uunet.uu.net (Jeff Sparkes)
In article <8909151808.AA26910@aurel.caltech.edu> bfox@AUREL.CALTECH.EDU (Brian Fox) writes:
From: bfox@AUREL.CALTECH.EDU (Brian Fox)
Date: 15 Sep 89 18:08:35 GMT
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:
> >$ echo "!ls"
> >ls": Event not found.
>
The quote stripping is not done correctly.
Compared to what? Do you have an example of history expansion that
works "correctly"?
Compared to the csh example that Rob mailed me.
Where is that example? Here is /bin/csh, SunOs 4.0, Sun3:
bfox@aurel$ /bin/csh
bfox@aurel%ls foomar
ls: foomar: No such file or directory
bfox@aurel%echo "!ls"
ls": Event not found.
Csh stripped the quotes.
No it didn't. And then, much to my confusion, you include an example of
tilde expansion, demonstrating that Csh does not expand tildes within
words: only where the tilde begins the word. What relevance does this
have to my question about history expansion?
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
Brian Fox
PS: I hacked history expansion do expand history references inside
matched quotes, using the close quote as a delimiter, since there is no
way to do that particular and useful expansion that I know of in Csh
history expansion.
That is to say:
echo "!ls"
expands to
echo "ls foomar"
I don't know of a way to do this with Csh.
Brian
Technical Details
Message-ID:
<8909171621.AA00423@aurel.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfoxReferences:
<JEFF1.89Sep17100406@docboy.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: <8909171621.AA00423@aurel.caltech.edu> Date: 17 Sep 89 16:21:57 GMT References: <JEFF1.89Sep17100406@docboy.mun.edu> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 65