[kwlug-disc] Interesting PS1
Hubert Chathi
hubert at uhoreg.ca
Wed Jan 7 17:26:55 EST 2026
I use starship.rs as my $PS1, and one of its modules shows the status
code of the previous command, with an option to show the status of each
command in the pipe, or just the status of the last command.
I agree that it's very handy to have that information in the prompt.
On Mon, 5 Jan 2026 16:11:54 -0500, William Park via kwlug-disc <kwlug-disc at kwlug.org> said:
> Hi all, While searching for a distro to migrate to, I found an
> interesting PS1:
> PS1='[$(tr " " "|" <<< "${PIPESTATUS[*]}") \u@\h \w]\$ '
> where the interesting part is the use of PIPESTATUS variable. I knew
> about it, but used in PS1. It's nice, because you don't have to type
> "echo $?" every time, and you see the result of each part of pipe.
> By the way, the fonts I used to type are,
> - "Fixed Width" for "PS1=" block quote line -- which is "Noto Sans
> Mono" on my screen. - "Variable Width" for the rest -- which is
> "Noto Serif" on my screen.
> How does it show on your screen?
> --William _______________________________________________ kwlug-disc
> mailing list To unsubscribe, send an email to
> kwlug-disc-leave at kwlug.org with the subject "unsubscribe", or email
> kwlug-disc-owner at kwlug.org to contact a human being.
More information about the kwlug-disc
mailing list