bash: display running foreground command in xterm title
How can I get bash to display the currently running command (at least the
foreground process) in the titlebar of an xterm? All I'm finding on Google
involves the C shell, which I don't use.
It it even possible with the current bash?
Different question: Is it feasable for the terminal emulator to find out
which process writes to its pseudo tty? The answer is yes, lsof proves it.
But is it also possible without using polling techniques, i.e. somehow
install a "callback" function that is invoked whenever a process inherits
a tty handle?
Best Regards, | Hi! I'm a .signature virus. Copy me into
Sebastian | your ~/.signature to help me spread!