Hi,
I am fairly new to GNU-Screen. During the course of customizing screen I got
to know about setting the window title from a program. To that effect I have
this code in my .bashrc
# If this is an xterm set the title to u...@host:dir
# If we are in screen then set the screen title to command being run.
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${us...@${hostname}: ${PWD}\007"'
;;
screen)
trap 'echo -ne "\033k$BASH_COMMAND\033\\"' DEBUG
PROMPT_COMMAND='echo -ne "\033k${us...@${hostname}:${PWD}\033\\"'
;;
*)
;;
esac
With this the window title is being set properly, but I am seeing extra
quotes in my command prompt. It looks like this now : *"usern...@hostname:~$
*
Notice the double quote at the beginning. If I clear the screen with Ctrl +
L, the additional quote does not appear. After that if I press the Enter key
or at the end of a command execution when the prompt returns, the quote
comes again.
I could not figure out where it is coming from. It is not a big thing
functionality wise, but it is some what irritating. So any help to get a
proper command prompt will be very helpful.
To add to the weirdness when I first start screen I have two more additional
quotes before the prompt (one double and one single). The prompt looks like
this : *" ' "usern...@hostname:~$*
Here are the contents of my .screenrc
# don't display the copyright page
startup_message off
defscrollback 10000
# fix scrollback in putty
termcapinfo xterm* ti@:te@
vbell off
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a
"
I am using GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu) on Ubuntu
- Ubuntu 8.04 - Hardy Heron.
Thank you.
PS : I am not subscribed to this mailing list. So kindly include my email id
in the replies.
--
Regards,
Brahmana.
The LIGHT shows the way.
The WISE see it.
The BRAVE walk it.
The PERSISTENT endure and complete it.
I want to do it all ALONE.
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users