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

Jerry Kemp sun.mail.list47 at oryx.us
Fri Aug 19 03:38:55 UTC 2016


Thanks for the feedback Alan,

I use c shell as my interactive shell, but as I test your prompt variable, I see 
that it sets both the shell prompt and the window title.

Jerry


On 08/18/16 05:25 PM, Alan Coopersmith wrote:
> 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
>
>
>



More information about the openindiana-discuss mailing list