You are not logged in.
Pages: 1
PS1 environment variable at the moment is:
'\[\e]2;\u ${PWD}\a\]\u@\h \W '
I'll tell the meaning for not xterm native speakers,
\[ avoids that bash counts the characters as printable ones,
\e]2; the escape sequence that sets the xterm title
\u username
${PWD} the current folder
\a end of the title
\u username
@ symbol
\h hostname
\W working directory.
Since I have often many open terminals, I make confusion about who makes what. Is there a way to outputs the last executed command, so I can add it to the xterm title?
Offline
Hi ezzetabi,
try with this command:
fc -ln|tail -1
Offline
Cool, thanks for the idea. You can even save a process with:
fc -ln -1
Offline
Offline
Pages: 1