[kwlug-disc] Interesting PS1

William Park opengeometry at yahoo.ca
Mon Jan 5 16:11:54 EST 2026


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20260105/b64d321b/attachment.htm>


More information about the kwlug-disc mailing list