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

quoting arguments in a script



Hi,

I'm looking for a way to quote strings in a zsh script.

Consider the following example script which should be able to be
used exactly like the original grep:

  #!/bin/zsh
  emacsclient -e "(grep \"grep -nH $@\")"

This is not working because $@ breaks the string.  Replacing $@
with $* won't be enough either.

Maybe it is possible to use the builtin function quote-line (M-')
for this?

Thanks in advance.



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