zsh-users
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Lawrence Velázquez" <larryv@zsh.org>
Cc: zsh-users@zsh.org, "Duke Normandin" <dukeofpurl@gmx.com>
Subject: Re: My zsh prompt
Date: Thu, 23 Dec 2021 20:26:32 +0000	[thread overview]
Message-ID: <9f228b0b-d85a-48eb-a402-f55d475f4890@www.fastmail.com> (raw)
In-Reply-To: <0d347ad9-a76f-47c6-bf89-d12339f730e9@www.fastmail.com>

Lawrence Velázquez wrote on Thu, 23 Dec 2021 06:28 +00:00:
> On Thu, Dec 23, 2021, at 12:18 AM, Duke Normandin wrote:
>> Hopefully zshmisc has a list of those return statuses.
>
> It doesn't, as the shell does not determine the exit statuses of
> external utilities.  Beyond the general convention of zero for
> success and nonzero otherwise, utilities dictate their own statuses,
> so it's up to you to consult the appropriate documentation.
>
> (The zshbuiltins(1) man page documents notable exit statuses for
> builtins.)

In addition to the zero/non-zero convention, there are:

- A process killed by a signal exits with 128+$signal.  That's why
  Lawrence guessed the <130> was the exit code (130-128 is SIGINT)..

- There's sysexits.h, but not everyone uses it.  However, one could
  argue that zsh should recognize those and print messages similar to
  the messages it prints for processes killed by signals.

Cheers,

Daniel


  reply	other threads:[~2021-12-23 20:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23  4:04 Duke Normandin
2021-12-23  4:40 ` Lawrence Velázquez
2021-12-23  4:53   ` Duke Normandin
2021-12-23  5:11     ` Lawrence Velázquez
2021-12-23  5:18       ` Duke Normandin
2021-12-23  6:28         ` Lawrence Velázquez
2021-12-23 20:26           ` Daniel Shahaf [this message]
2021-12-23 20:46             ` Duke Normandin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f228b0b-d85a-48eb-a402-f55d475f4890@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=dukeofpurl@gmx.com \
    --cc=larryv@zsh.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).