Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: minor module tweak
- X-seq: zsh-workers 23233
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: minor module tweak
- Date: Fri, 23 Mar 2007 08:39:12 -0700
- In-reply-to: <200703231418.l2NEIjGi001132@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200703231418.l2NEIjGi001132@xxxxxxxxxxxxxx>
On Mar 23, 2:18pm, Peter Stephenson wrote:
}
} While playing about with zmodload I noted that a failed zmodload
} doesn't flag an error, so you can use it as a test for module
} availability. I've interpreted this as a feature and documented it.
It's certainly been used this way ever since the -i flag was added;
e.g. in zfinit: zmodload -i zsh/net/tcp || return 1
So it's fine that you documented this, but I think it was implicit all
along in the phrase "prints an error message and returns a non-zero
status." (If it were going to abort the code block, it couldn't return
a status, could it?)
There are a few places in Functions/**/*(.) where the "|| return 1"
could helpfully to be appended to a "zmodload -i" that currently just
assumes it will succeed.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author