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

Re: append to history entry?



On Dec 27, 12:55pm, Daniel Shahaf wrote:
}
}     print -rS -- "rap ${(q)@} ; : ${(q)HOST}"

Well, if we're being really pedantic, that's not right either, because
print -S requires a single string argument, but ${(q)@} in double quotes
results in multiple strings quoted individually, whereas ${(q)*} results
in backslashing the spaces between the arguments.

An extra level of nested expansion fixes that, and for readability it'd
be better to use (q+) on the arguments and (q-) on the host name:

    print -rS -- "rap ${${(q+)@}} ; : ${(q-)HOST}"



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