Unix Prompt
here is my current Unix prompt (I would appreciate if someone could tell me how I put in the name of the current user (“whoami”). %n only gives me the name of the user that started the shell, but if I do a “su someone”, I’d like to see his name here). A nice page for this stuff is here.
set prompt="%B[%/]%b\n%m (%T) > "
one can also change the title of an Xterm Window (see also here)
echo -n "\033]0;${USER}@${HOST}\007"
Das ganze kann man jetzt auch noch kombinieren… wow… (hmmm… interessanterweise zeigt das Wiki den Befehl nicht korrekt an… (also aus der unteren Zeile die Leerzeichen wegdenken…
set prompt="%{\033]0;%n@~\007%}%{\033[1;34m%}[%/]%{\033[0m%}\nT > "
set prompt="%{\033]0;%n@% m:%~\007%}%{\033[1;34m%}[%/]%{\033[0m%}\n% m %T > "
setzt sowohl den Fenstertitel als auch das prompt. sehr praktisch.
