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

Splitting string to array removes pipe symbol


First, let me take this opportunity to say thank you for such a
wonderful shell.  After switching over to Z shell I would never want
to go back to any of the previous shells.  Bash has served me well
over the years, but I am burning my bridge behind me.

I am working on a script that splits a string into an array in
preparation for execution with something like

  cmd="uncompress foobar | cpio -i --quiet --unconditional"

However, when the globsubst option is set, it removes the pipe '|'
symbol when it does the split.  Here is the trace output.

  +./t:62> cmd=uncompress foobar | cpio -i --quiet --unconditional
  +./t:63> cmd=( uncompress foobar cpio -i --quiet --unconditional )

If this is not a bug, then I must not fully understand the function of
GLOB_SUBST.  I have it set so that variables with wild cards, etc in
them will expand to a list of filenames.  Why would it remove the pipe
from the string in this case?

I am running zsh-4.1.0.dev5 on FreeBSD-5.1 in case it is relevant.


Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!

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