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

Re: path PATH



On Wed, Jan 25, 2023 at 5:38 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> So what would be a complete list of unset
> params?  This is close:
>
> $ typeset -mp "*" | grep -e "=(  )$" -e "=''$" -e "=0$"
>
> typeset ZLE_LINE_ABORTED=''
> [...]
> typeset -i10 EGID=0

All of these parameters are set. Here's how an unset parameter looks like:

    % typeset -p blah
    typeset: no such variable: blah

    % [[ -v blah ]] || print unset
    unset

    % (( ${+blah} )) || print unset
    unset

You can print the list of all unset parameters but the output will be
infinite. To do that, you start by enumerating all one-character names
and checking them against `[[ -v ]]`. Proceed with two-character
names, etc.

Roman.




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