[Top][All Lists]

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

Additional quotes in the command prompt in screen.

From: Srirang Doddihal
Subject: Additional quotes in the command prompt in screen.
Date: Mon, 20 Jul 2009 13:19:26 +0530


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 address@hidden:dir
# If we are in screen then set the screen title to command being run.
case "$TERM" in
    PROMPT_COMMAND='echo -ne "\033]0;address@hidden: ${PWD}\007"'
    trap 'echo -ne "\033k$BASH_COMMAND\033\\"' DEBUG
    PROMPT_COMMAND='echo -ne "address@hidden:${PWD}\033\\"'

With this the window title is being set properly, but I am seeing extra quotes in my command prompt. It looks like this now : "address@hidden:~$

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 : " ' "address@hidden:~$

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.


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.

reply via email to

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