Skip to content

feat: make default bash prompt display nonzero exit codes#1209

Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:bash-prompt
Aug 25, 2025
Merged

feat: make default bash prompt display nonzero exit codes#1209
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:bash-prompt

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Jul 25, 2025

If the previous command's exit code was nonzero, the exit code is displayed inside square brackets in bold and red at the beginning of the bash command prompt. This gives a visual indicator of when a process has silently failed, which is particularly useful for run0 given that it currently will silently fail with exit code 203 for commands where it runs into problems with SELinux.

@HastD HastD requested a review from RoyalOughtness as a code owner July 25, 2025 22:59
@HastD

This comment was marked as resolved.

@HastD HastD marked this pull request as draft July 28, 2025 03:16
@HastD HastD marked this pull request as ready for review July 28, 2025 13:01
@HastD HastD requested a review from RoyalOughtness July 28, 2025 13:01
If the previous command's exit code was nonzero, the exit code is
displayed inside square brackets in bold and red at the beginning of the
bash command prompt. This gives a visual indicator of when a process has
silently failed.

The file needs to be alphabetically later than vte.sh, since that script
in /etc/profile.d overwrites PROMPT_COMMAND.

Signed-off-by: Daniel Hast <[email protected]>
@RoyalOughtness RoyalOughtness merged commit bd34043 into secureblue:live Aug 25, 2025
10 checks passed
@HastD HastD deleted the bash-prompt branch August 25, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants