You are not logged in.

#1 2017-01-17 13:09:34

adesh
Member
Registered: 2016-10-05
Posts: 167

Current process / command name in terminal title

While running commands in iTerm2 under macOS, I can see the name of currently running process in the tab title. For example if a long running shell script is being executed in the terminal, tab title will automatically change to reflect the currently running process (binary file being executed under /bin to be exact) as different lines of the script are processed. Title also changes correctly to indicate which command in the pipeline is currently being executed. It really helps when I'm working with many tabs. I want similar functionality on my Arch machine, but couldn't find a terminal emulator which supports it.

I've tried xfce4-terminal, gnome-terminal and terminator. They don't seem to support it as I could not find any option to enable fuch functionality in prefrences dialog. Does anybody know how to achieve this? I'm running Xfce and would like a solution which works well with it.

Last edited by adesh (2017-01-17 13:10:09)

Offline

#2 2017-01-17 14:48:03

olivarch
Member
Registered: 2013-01-26
Posts: 47

Re: Current process / command name in terminal title

Interesting question !
I could find this , maybe it'll help :

http://www.davidpashley.com/articles/xt … with-bash/

Offline

#3 2017-01-18 13:08:29

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: Current process / command name in terminal title

Tried that. Not exactly what I wanted, but it is something.
First there are some issues with escape sequences, it destroys my prompt with some garbled text.
Second, while using a pipeline, title always shows the last command in the pipeline, not the currently being active.

Also, the feature in iTerm is very advanced. For example if you run 'git log' and the computer is slow enough or not warmed up, title even shows the commands internally executed by git like 'xcodebuild', 'basename' and the like.

Offline

Board footer

Powered by FluxBB