bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about Xterm title


From: Al Elgert
Subject: Re: Question about Xterm title
Date: Fri, 18 Feb 2005 23:11:49 +0100
User-agent: Mutt/1.5.2i

Serge Koksharov schrieb am 18.02.2005 um 06:32:52 (+0300):
> On Thu, Feb 17, 2005 at 04:12:49PM +0100, Al Elgert wrote:
> > Hello,
> > 
> > you can change the title with this command (if the term supports it):
> > 
> >     echo -en "\033]0;--- $HOSTNAME $TERM $$ ---\007"
> >                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> May be I'm don't explained clearly enough. I need dynamic title, not static.
> For example, I type:
> $some_ncurses_appname -arg1 -arg2 <CR>
> And after I pressed enter key I want xterm title changed to:
> "-=xterm=- myhost.mydomain: some_ncurses_appname -arg1 -arg2".
> 
> zsh uses preexec() builtin function to accomplish this - a function which is
> just before a command is executed, and I haven't found any way to do this in
> bash. Look at http://www.tldp.org/HOWTO/Xterm-Title-6.html if I'm again not
> described my problem clearly enough.

(Sorry, I overread the preexec part.)
So your problem is not to set a title in xterm.
Your problem is that PROMPT_COMMAND is applied _after_ the execution of the
command.

Do you want something like this?

.inputrc:
        "\C-m": "\C-apreexec \n" accept-line

I do not know a better way to do this in bash, Sorry.

greetings
        Alexander




reply via email to

[Prev in Thread] Current Thread [Next in Thread]