Re: strange cursor behavior in gnome terminal



On Wed, Sep 20, 2006 at 01:04:49AM +0200, Marco wrote:
Marius Gedminas wrote:

I've seent his problem. The cause was my $PS1 setting in my ~/.bashrc
file: I had some xterm escape sequences to set the window title. I
removed the escapes from $PS1 and instead added a $PROMPT_COMMAND to
do the same thing (copy & paste from /etc/skel.bashrc), and the irritating
cursor jumping disappeared.

Thank you Marius, it seems to be the right way. Would you please help me to
optimize it.

I like to have a short prompt, e.g. a green $ for a normal user.

PS1='\[\033[01;32m\]\$ \[\033[00m\]'

And I would
like to set the console title to user@machine/path. With the escape
sequences I had this in Konsole sessions. But I don't know how to achieve
it with the $PROMPT_COMMAND.

PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}/${PWD}\007"'

If you also want the terminal window title to show you the command that
is currently being executed, check out http://mg.pov.lt/blog/bash-prompt.html

HTH,
Marius Gedminas
--
I once asked an older coworker and Solaris guru what happened with the
Unix-haters list. He told me that it stopped being quite so funny once Windows
NT came along.
-- the gnat at slashdot

Attachment: signature.asc
Description: Digital signature

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: strange cursor behavior in gnome terminal
    ... Marius Gedminas wrote: ... I had some xterm escape sequences to set the window title. ... removed the escapes from $PS1 and instead added a $PROMPT_COMMAND to ...
    (Ubuntu)
  • Re: Santa Bill McReynolds
    ... better and logical escape point, and it WAS found that way. ... suitcase there as part of staging doesn't fit. ... then putting the suitcase under the window to ... the basement window you are talking about was not difficult to ...
    (alt.true-crime)
  • Re: Problem with window.open in Firefox
    ... window can be opened with that dimensions or that they make sense anyway. ... resizability which in combination is certainly a Bad Thing. ... : (isMethodType(typeof escape) ...
    (comp.lang.javascript)
  • Re: How come we no no see police or army cordon those forested area...you mean the MS issue over ah?
    ... men to go after those monkeys ... window, he would not probably been able to jump over a double fencing ... they had used a young man to re-enact the escape is a farce. ...
    (soc.culture.singapore)
  • Re: loop never exits on ESC
    ... > I tried ur code but have not got any wait window when i pressed ESC :-( ... >> WINDOW for about .5 second each time you press escape. ... >>>>> ENDIF ...
    (microsoft.public.fox.programmer.exchange)