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

Re: declare -p and -H (hideval)



On May 15,  1:36pm, Daniel Shahaf wrote:
}
} Bart Schaefer wrote on Sun, May 14, 2017 at 10:22:07 -0700:
} > It'd be quite simple to make -pm behave differently
} 
} I went down the rabbit hole, and it seems pretty sane so far:

This (changing the default behavior of -p) isn't where I'd have gone
with this.  I'd have e.g. added PRINT_INCLUDEVALUE to the flags in
the case of -m and -p used together.  Even in your patch, I don't
see any purpose to PRINT_ALL that isn't covered by _INCLUDEVALUE.

} +    { PM_EXPORTED, "exported", 'x', 0},
} +    { PM_HIDE, "hiding", 'h', 0},
} +    { PM_HIDEVAL, "hidden value", 'H', 0}

I don't think it's quite that easy.  For one thing PM_HIDE can be
attached to a top-level variable, but has no effect there, so it's
not clear whether to include it in the typeset output or if instead
it needs special handling ala PM_EXPORTED.

Follow-ups to zsh-workers.



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