[COFF] What is your prompt?

Greg 'groggy' Lehey grog at lemis.com
Sun Dec 26 09:19:41 AEST 2021


On Friday, 24 December 2021 at 23:40:56 -0500, Theodore Ts'o wrote:
> Here are examples of some of my prompts.  It does use two lines, but
> the extra context is worth it to me:
>
> <tytso at cwcc> {/home/tytso}
> 267% cd /usr/projects/e2fsprogs/base

That's actually surprisingly like mine, though I squeeze it into one
line.  Like you, I find user, system and cwd important, but also the
tty.  In addition I put a marker to help find prompts in long output,
so a typical prompt might be:

  === grog at bilbo (/dev/pts/27) ~/src 6 -> 

That's generated with

  PS1="\[ESC[34m\]=== \u@\h (`tty`) \[ESC[31m\]\w\[ESC[34m\] \# ->\[ESC[30m\]\[ESC[47m\] "

> 272% su
> Password:
> <tytso.root at cwcc> {/home/tytso}, level 2

That's interesting.  How do you do that?

Greg
--
Sent from my desktop computer.
Finger grog at lemis.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA.php
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20211226/aa65b26e/attachment.sig>


More information about the COFF mailing list