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

Re: Fw: PATCH: typeset -P



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.



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