zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Fw: PATCH: typeset -P
Date: Fri, 29 Sep 2017 15:55:33 -0700	[thread overview]
Message-ID: <170929155533.ZM15802@torch.brasslantern.com> (raw)
In-Reply-To: <20170929205059.5fa7eb4d@ntlworld.com>

On Sep 29,  8:50pm, Peter Stephenson wrote:
}
} +item(tt(-P))(
} +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.


  reply	other threads:[~2017-09-29 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 19:50 Peter Stephenson
2017-09-29 22:55 ` Bart Schaefer [this message]
2017-09-30 12:48   ` Peter Stephenson
2017-09-30 19:46     ` Peter Stephenson
2017-10-01  0:11       ` Bart Schaefer
2017-10-01 16:48         ` Peter Stephenson
2017-10-01 17:06           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170929155533.ZM15802@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).