Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: path PATH
On Wed, Jan 25, 2023 at 7:26 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 2023-01-25 09:37, Roman Perepelitsa wrote:
> >
> > This value is usually called "empty" or "null". The parameter is not
> > unset though.
> >
> Ah. Ok, that's the correct terminology. Yeah. 'unset' implies the var
> itself does not exist vs. having a null value. So how can I check for
> all null parameters?
You can use [[ -z ]] for that.
for name in ${(k)parameters}; do
if [[ -z ${(P)name} ]]; then
print -r -- $name
fi
done
> Come to that, how many fundamental types are there?
There is ‘scalar’, ‘array’, ‘integer’, ‘float’ or ‘association’. I
copied it straight from the docs.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author