Zsh Mailing List Archive
Messages sorted by:
Re: Fw: PATCH: typeset -P
- X-seq: zsh-workers 41794
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Fw: PATCH: typeset -P
- Date: Fri, 29 Sep 2017 15:55:33 -0700
- 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=/jIgkxdzqzzMlqfRHlOtdrrOzzN9laajTjljm8o4ZJk=; b=zmYzCDTCioyt7myJhbPNsRA0HETl4RPeaFlrl7jcmJNwPPt769zYo+UuuqYNA/6x7d cOPdLhUdCQYAejEtB1Y5K98QZf+VpyClGMiQvUWw7klNTGkkPwb2s023njWU7VNMQMo2 NULKoAQpziwVH3wcrcH0h75+Iq1fZKHOw5AhTFvL2pzZ9urjt8T8bdUHiqQx9Gwu2CWm FpXSU721fbz/em9H5/MlXUA9zzOORwvOfHgaPv++oxCRZh6Pl4x8QY4p+pWKA1VOjZ7F ZtwdzU0WAoa8a5i5dTwMkyHfwZf6/Gj2/XoTGOZruMt4zQAbzkMOD6KCZdvZSDYHm7oL MFyw==
- In-reply-to: <email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <firstname.lastname@example.org>
On Sep 29, 8:50pm, Peter Stephenson wrote:
} +Identical to tt(-P), except that arrays and associative arrays are
Need to lower-case that second -P.
I'm ambivalent about this choice of option letter, though. What about
something entirely unlikely to conflict, like -1 (ala "ls -1")? Then
e.g. one could use the idiom "typeset -p1" to make it obvious.
We could also have "typeset -2" to output associative arrays in the old
(k1 v1 k2 v2 ...) format (I suppose "typeset -12" would then print a
newline after each value but not after each key).
I have two requests with respect to the rest of this patch:
(1) Don't print the blank line for arrays with no elements, e.g. NOT
typeset -a cdpath=(
Ideally this would just be cdpath=() as before, but I could live with one
line break in the parens.
(2) Indent each element by a couple of spaces.
Messages sorted by: