Hi, I installed this version of mc by Oleg "Olegarch" Konovalov http://mc.linuxinside.com/cgi-bin/dir.cgi It is VERY nice. Found it in the recent thread: "Why does MidnightCommander require XFree86?". Of course I shall ask Oleg since he gives his address for questions and bugs. But I think it might be some problems with my configurations of SuSE 8.0 and 8.2. The prompt is visualy weirdly garbaged though functionnal. In an xterm my usual prompt is: "leonard@pip:~>" and when I open mc I get: "2;leonard@pip:~G1;pip^Gleonard@pip:~" in guise of prompt. And the same thing with rxvt, aterm, wterm, konsole or a gnome-terminal. What is puzzeling me is that if I switch for su mode, the prompt is: "pip:/home/leonard #" as it should be, with mc as in the terminal. I have this weirdness on this laptop from where I write this message and SuSE 8.2 but not on another computer with SuSE 8.0 And in console mode there is no problem of that sort. Has any of you experienced this? Thanks. O. L.
·· Ulysses ·· wrote:
The prompt is visualy weirdly garbaged though functionnal.
Has any of you experienced this?
The default prompt contains shell code to set the xterm window title which confuses MC. Add an entry to your .bashrc to override it e.g. export PS1=\u@\h:\w> sjb
On Saturday 16 August 2003 09:46, sjb wrote:
·· Ulysses ·· wrote:
The prompt is visualy weirdly garbaged though functionnal.
Has any of you experienced this?
The default prompt contains shell code to set the xterm window title which confuses MC.
Add an entry to your .bashrc to override it e.g.
export PS1=\u@\h:\w>
Two questions: What's all that about and why does it give me a syntax error? Dylan
sjb
-- Sweet moderation Heart of this nation Desert us not We are between the wars - Billy Bragg
Dylan wrote:
On Saturday 16 August 2003 09:46, sjb wrote:
·· Ulysses ·· wrote:
The prompt is visualy weirdly garbaged though functionnal.
Has any of you experienced this?
The default prompt contains shell code to set the xterm window title which confuses MC.
Add an entry to your .bashrc to override it e.g.
export PS1=\u@\h:\w>
Two questions: What's all that about and why does it give me a syntax error?
Dylan
sjb
Thanks to sjb it worked but as he said last time, with quotes:
export PS1="\u@\h:\w> " or export PS1='\u@\h:\w> ' I had his message about this very topic in my stock of SuSE list messages but did not manage to find it again. Thanks! But I dont understand why in an xterm as root I do not have this problem of corrupt prompt though the .bashrc of root does not contain this line. O. LICHTENBERGER
·· Ulysses ·· wrote:
But I dont understand why in an xterm as root I do not have this problem of corrupt prompt though the .bashrc of root does not contain this line.
If you look in /etc/bash.bashrc, you'll see this .. # Other prompting for root _t="" if test "$UID" = 0 ; then _u="\h" _p=" #" else _u="\u@\h" _p=">" if test \( "$TERM" = "xterm" -o "${TERM#screen}" != "$TERM" \) -a -z "$EMACS" ; then _t="\[\e]2;\u@\h:\$(ppwd)\007\e]1;\h\007\]" fi fi The "if" clause causes different behaviour for root. It's the "else" clause (everybody who isn't root) that sets the prompt that confuses MC. sjb
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 21 August 2003 08:16 am, sjb wrote:
·· Ulysses ·· wrote:
But I dont understand why in an xterm as root I do not have this problem of corrupt prompt though the .bashrc of root does not contain this line.
If you look in /etc/bash.bashrc, you'll see this ..
# Other prompting for root _t="" if test "$UID" = 0 ; then _u="\h" _p=" #" else _u="\u@\h" _p=">" if test \( "$TERM" = "xterm" -o "${TERM#screen}" != "$TERM" \) -a -z "$EMACS" ; then _t="\[\e]2;\u@\h:\$(ppwd)\007\e]1;\h\007\]" fi fi
I sent a patch to the list a while back that fixes this: http://lists.suse.com/archive/suse-linux-e/2003-Jun/0316.html The formatting is a little screwed up in a web browser, but it's still readable. - -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/RPqj+FOexA3koIgRAhskAJ49CLZC3n89wvEMIMJ72cF9cqw1HgCgkqj7 eyBvE0EFoSvn84FuEFGaDvw= =FAI7 -----END PGP SIGNATURE-----
Dylan wrote:
The default prompt contains shell code to set the xterm window title which confuses MC.
Add an entry to your .bashrc to override it e.g.
export PS1=\u@\h:\w>
Two questions: What's all that about and why does it give me a syntax error?
PS1 is the environment variable that defines your bash prompt. (Actually, the primary bash prompt, PS2 defines the continuation prompt, usually '>'). \u = username \h = host name \w = working directory 8.2 has a default prompt which contains code to set the title of the xterm to the working directory, and that confuses MC. The default prompt is set in /etc/bashrc, but you can override the default in your user's ~/.bashrc The syntax error is because I neglected to wrap the prompt code in single quotes. It should have been export PS1='\u@\h:\w> ' My apologies. The man entry for bash will explain all. sjb
On Saturday 16 August 2003 21:17, sjb wrote:
Dylan wrote:
The default prompt contains shell code to set the xterm window title which confuses MC.
Add an entry to your .bashrc to override it e.g.
export PS1=\u@\h:\w>
Two questions: What's all that about and why does it give me a syntax error?
PS1 is the environment variable that defines your bash prompt. (Actually, the primary bash prompt, PS2 defines the continuation prompt, usually '>').
\u = username \h = host name \w = working directory
8.2 has a default prompt which contains code to set the title of the xterm to the working directory, and that confuses MC. The default prompt is set in /etc/bashrc, but you can override the default in your user's ~/.bashrc
The syntax error is because I neglected to wrap the prompt code in single quotes. It should have been
export PS1='\u@\h:\w> '
Thank you - am I right in thinking the single quote leads to expansion of escapes and variables whereas a double quote indicates a literal string? Dylan
My apologies.
The man entry for bash will explain all.
sjb
-- Sweet moderation Heart of this nation Desert us not We are between the wars - Billy Bragg
participants (4)
-
Dylan
-
James Oakley
-
sjb
-
·· Ulysses ··