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

2016-08-18 Thread Jerry Kemp

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





___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


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

2016-08-18 Thread Alan Coopersmith

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.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc

___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


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

2016-08-18 Thread Jerry Kemp

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.

Wondering if there is some more elegant and/or more official way to set the 
title from the command line?  Yes, I know I can set the title by using the 
rodent and


Terminal->set title

and I'm not asking about that.

Specifically, I'm wondering if there are other/better methods to set the title 
from the shell prompt aside from the method shown above.  If it is in the man 
page, I'm missing it.


Thank you,

Jerry

___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss