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

Re: Quoting =(command)



On May 15,  3:17pm, A. Wik wrote:
}
} On Sun, 26 Mar 2006, Peter Stephenson wrote:
} 
} > [This is probably more in the line of zsh-users.]
} 
} I'm inclined to agree - however, not considering the point
} of view of posting at the time of reading the subscription 
} instructions, I interpreted them as "just forget zsh-users
} and join zsh-workers for the full range of content"... (but
} I'll try it now.)

It's more a matter of where it gets archived.  zsh-users posts are
forwarded to zsh-workers subscribers, but they are not archived with
the zsh-workers material -- and obviously zsh-workers stuff is not
archived with zsh-users.  So someone searching for this answer after
the fact is better served if it is in the zsh-users archive.

} a workaround about as concise as can reasonably be expected:
} 
} 	star -cv f=bak.tar list=${:-=(commands...)}
} 
} Perhaps it should be mentioned or at least hinted at in the 
} context of the =() construct, as that was where I started
} looking.

I think this is more an FAQ than something for the base documentation.

The whole idea of using ${:-word} with nothing to the left of the colon
is an obscure zsh trick.  It only works because of zsh's rules for
parsing nested expansions; in other shells you get "bad substitution".

I don't think the process substitition context is the right place to
write about this, as it is only a subset of a more general "problem."
Wanting a generated file name as as a substring of a longer argument
word is a case that requires special handling no matter how the file
name is being generated.  E.g., I'm sure you would not have expected

    star -cv f=*.tar list=*.out

to work.  In this respect list==(...) is no different.

-- 



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