[OpenIndiana-discuss] updating/modifying gnome-terminal title from the command line?

Alan Coopersmith alan.coopersmith at oracle.com
Thu Aug 18 22:25:27 UTC 2016


On 08/18/16 02:57 PM, Jerry Kemp wrote:
> I spend a good part of my life at a shell prompt in a Gnome terminal.
>
> I frequently have a lot of tab's open, and it is helpful for me to set the title
> for each tab to some unique setting.
>
> I fired up duckduckgo, and after some searches, I came up with this, as a way to
> set the tab title from the command line:
>
> /bin/echo -n "\033]2;your-tab-title-here\007"
>
> This works, but is a little cumbersome.

I've had this in my ~/.cshrc for tcsh for longer that I can remember (since tcsh
was the hot new shell, before zsh, fish, etc. became newer and cooler):

if ($?prompt) then
     if ($?tcsh) then
         if (($term == xterm) || ($term == vs100) || ($term == dtterm)) then
             set prompt='%{\e]2\;%n@%m:%~^g\e]1\;%n@%m^g\r%}%B%n@%m:%b%~ [%t - %h] '
         else
             set prompt='%B%n@%m:%b%~ [%t - %h] '
         endif
     endif
endif



-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc



More information about the openindiana-discuss mailing list