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

RE: revised patch: zshmisc(1) clarify non-successful exit statuses



"Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Apr 23, 2021 at 5:19 AM <zeurkous@xxxxxxxx> wrote:
>>
>> vindex(path, use of)
>> Otherwise, the shell searches each element of tt($path) for a
>> -directory containing an executable file by that name. If the
>> -search is unsuccessful, the shell prints an error message and returns
>> -a nonzero exit status.
>> +directory containing an executable file by that name.
>
> I would leave this paragraph unchanged. It's not necessary to delete
> the reference to "a nonzero exit status" in order to later explain
> what the nonzero values are.

Heh, me reason was the exact opposite: it didn't seem necessary to
duplicate it.

>> +If execution fails: an error message is printed, and one of the
>> +following values is returned.
>
> I would move this along with the sitem list to the very end, to follow
> the paragraph about the command_not_found handler.
>
> Then change "If execution fails:" to "When there is no handler and
> execution fails,".

That opens up a question: what happens when execution fails inside the
handler?

>> +startsitem()
>> +sitem(127)
>> +The search was unsuccessful. The error message is
>> +`tt(command not found:) var(cmd)'.
>
> As Daniel mentioned, this should be
>
> sitem(127)(Your new text
> goes here)

Yeah, that's been noted :)

        --zeurkous.

-- 
Friggin' Machines!




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