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@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@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@cwcc> {/home/tytso}, level 2
That's interesting. How do you do that?
Greg
--
Sent from my desktop computer.
Finger grog(a)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