Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: echo "!" ... what's wrong with the exclamation point ?



Mildred wrote:
Hi,

I'm using zsh for some time but I just needed to put an exclamation
point inside double quotes and I get something wierd:

$ echo "abc ! def"
abc ! def
$ echo "abc !"
dquote> "
abc

$ echo "abc !! def"
echo "abc echo "abc
" def"
abc echo abc
zsh: command not found:  def

What's wrong with those exclamation points, and why do they get
evaluated ?


! normally invokes history-lookups unless you use single quotes or \.

!! last command
!foo last command beginning `foo'
!:7 the 7th word in the previous command-line
!$ the last word off the previous command-line


~Tim



Messages sorted by: Reverse Date, Date, Thread, Author