On 8/28/06, Martin Bähr <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 28, 2006 at 02:44:24AM +0200, Axel Liljencrantz wrote:
> > >i figured that i should be able to do the same inside the function:
> > >function fish_title
> > > echo -ne '\033ksometitle\033\\'
> > >end
> > function fish_title
> > echo sometitle
> > end
> > should work.
>
> no, that will change the xterm title,
> i want to change the screen title inside the xterm.
> for that the above escapes need to be used for screen to pick them up.
>
> the problem is that fish takes the fish_title output
> and wraps it in the escapes needed for the xterm.
>
> so this helps:
> function fish_title
> echo -ne '\007\033k'$_'\033\\\033]0;'
> end
>
> for some reason this produces a beep though (the beep is the end of the
> sequence so it should be caught and not make a noise.)
Ok, I didn't know about that functionality. One possibility would be
to make fish_title always set the screen title instead of the xterm
title when inside screen. Would that make sense?
Other than that, I suspect that the bell you hear is because the bell
character is the end of the escape code for setting the title. So make
sure that at the end of the title, the beginning but no the end of the
set tterminal title escape sequence has been set. Something like this
might work:
function fish_title
echo -ne \7\033 blah blah screen title\033\e]2\; blah blah xterm title
end
>
> > To get the name of the job currently being
> > executed, you can use the $_ variable.
>
> ah, thanks.
>
> > Because backslash escapes are disabled in quoted strings. This may
> > seem backwards, but it's not if you think about it. The role of quotes
> > in shells is to _disable_ most types of string transformations. Why
> > should backslash escapes be any different?
>
> true. that makes sense.
> btw, i find that whereever i need to expand a variable i can just do:
> "foo"$var"baz"
> which makes variable interpolation in strings unnecessary, or is there a
> case where this would not work?
None. The reason why that exists is:
* Because everybody but me seems to like it. I hate it, but I am weak
and want people to like me.
* Because it expands differently, specifically quoted variables are
expanded to exactly one element, even if the variable is an array. The
elements are space spearated. This is often useful, for example when
using a variable in test you generally want to be sure of how many
arguments are created from a variable expansion.
>
> greetings, martin.
> --
> cooperative communication with sTeam - caudium, pike, roxen and unix
> offering: programming, training and administration - anywhere in the world
> --
> pike programmer travelling and working in europe open-steam.org
> unix system- bahai.or.at iaeste.(tuwien.ac|or).at
> administrator (caudium|gotpike).org is.schon.org
> Martin Bähr http://www.iaeste.or.at/~mbaehr/
>
--
Axel
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users