Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: append to history entry?
- X-seq: zsh-users 22286
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: append to history entry?
- Date: Tue, 27 Dec 2016 08:00:22 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=Wj3leBsC4kjL4Mma5G5/qsM7ZJchrxDQ3JyzFtOdW6A=; b=RFdEFhY7QdxmznEJXgqU0X++rLXZz5WMHcc3z2ssPt0ev46/NgQZAgbkG3BoV37qUt yotl81/eKYGRlEFlL2WgzKaCBfOZwAeUwHirlACOmhPGKvQycQNLYG94p5R+vLBKQE4f uq799HaPcChcTT/lhZquybnX/WueiYGb5+a9Y9A+nzFv4zzv0kyhYY0IZe7s5xFJB4AT HL1Kbwv8nqxvt/s2nGyz4xAorKp6BYU8/1rY6ZNvUS+914zDeC6xdu/lOpuJxdMr2iwr EO5plsWffr9uMLt5vQPzX07Spjc0TZRQqaoUeiUs9IJ2tgNShuFa7/rXMxjrcwGLO9ib XP/A==
- In-reply-to: <20161227125530.GA4796@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <a18cf6d4-9fcb-7758-599e-4a56d2258824@eastlink.ca> <5288b537-f06a-d18a-60ea-1f962856c80c__41345.3811700039$1482803962$gmane$org@eastlink.ca> <20161227125530.GA4796@fujitsu.shahaf.local2>
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