[opensuse] Konsole problems
http://martinjh.myby.co.uk/ss1.png Does anyone have the problem with Konsole in the last line there? It does the same thing with xterm as well. Is it a bug or something else?? I have tried changing the font and that doesn't help either! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Does this happen with just this command sequence, or all command sequences? Martin J Hooper wrote:
http://martinjh.myby.co.uk/ss1.png
Does anyone have the problem with Konsole in the last line there?
It does the same thing with xterm as well. Is it a bug or something else?? I have tried changing the font and that doesn't help either!
G.T.Smith wrote:
Does this happen with just this command sequence, or all command sequences?
All sequences - I changed the bash prompt just to have the current working directory instead of the whole path and that doesn't help it either. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Martin, On Thursday 05 April 2007 03:05, Martin J Hooper wrote:
http://martinjh.myby.co.uk/ss1.png
Does anyone have the problem with Konsole in the last line there?
It does the same thing with xterm as well. Is it a bug or something else?? I have tried changing the font and that doesn't help either!
Most likely there's a problem with your PS1 string. It appears you're altering the color within the prompt, and any portions of the prompt string that do not yield visible characters must be surrounded with \[ (two characters, escape as necessary) and \]. Otherwise the cursor positioning code used when you, say back up the cursor, erase parts of the line or wrap at the right margin, have the wrong value for the cursor's position following the prompt and subsequently send incorrect positioning commands. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
Martin, Most likely there's a problem with your PS1 string. It appears you're altering the color within the prompt, and any portions of the prompt string that do not yield visible characters must be surrounded with \[ (two characters, escape as necessary) and \]. Otherwise the cursor positioning code used when you, say back up the cursor, erase parts of the line or wrap at the right margin, have the wrong value for the cursor's position following the prompt and subsequently send incorrect positioning commands.
Randall Schulz
Here is the part of .bashrc that changes the cursor - I have not much knowledge about whats going on here... # Define a few Color's BLACK='\e[0;30m' BLUE='\e[0;34m' GREEN='\e[0;32m' CYAN='\e[0;36m' RED='\e[0;31m' PURPLE='\e[0;35m' BROWN='\e[0;33m' LIGHTGRAY='\e[0;37m' DARKGRAY='\e[1;30m' LIGHTBLUE='\e[1;34m' LIGHTGREEN='\e[1;32m' LIGHTCYAN='\e[1;36m' LIGHTRED='\e[1;31m' LIGHTPURPLE='\e[1;35m' YELLOW='\e[1;33m' WHITE='\e[1;37m' NC='\e[0m' # No Color PS1="$CYAN$(ppwd \l)$LIGHTGREEN\u@\h:\W$NC >" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Martin, On Thursday 05 April 2007 08:55, Martin J Hooper wrote:
Randall R Schulz wrote:
Martin, Most likely there's a problem with your PS1 string. It appears you're altering the color within the prompt, and any portions of the prompt string that do not yield visible characters must be surrounded with \[ (two characters, escape as necessary) and \]. Otherwise the cursor positioning code used when you, say back up the cursor, erase parts of the line or wrap at the right margin, have the wrong value for the cursor's position following the prompt and subsequently send incorrect positioning commands.
Randall Schulz
Here is the part of .bashrc that changes the cursor - I have not much knowledge about whats going on here...
# Define a few Color's BLACK='\e[0;30m' ... WHITE='\e[1;37m' NC='\e[0m' # No Color
PS1="$CYAN$(ppwd \l)$LIGHTGREEN\u@\h:\W$NC >"
And that is definitely the problem. Change the PS1-setting command to this: PS1="\[$CYAN\]$(ppwd \l)\[$LIGHTGREEN\]\u@\h:\W\[$NC\] >" The command "ppwd" is new to me. In my shell, it's a shell procedure defined in /etc/bash.bashrc and emits multiple terminal escape sequences but does not appear to enclose them in the required \[ and \]. The comment on its definition is "Set xterm prompt with short path (last 18 characters)". I tried using it in a BASH shell in Konsole, and it yields no prompt at all. I'd probably drop it and directly refer to the values you want in your prompt: $USER, $HOST, $PWD etc. Do you care which terminal you're using (\l is replaced by "the basename of the shell's terminal device name" (search for PS1 in the BASH man page). Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
The command "ppwd" is new to me. In my shell, it's a shell procedure defined in /etc/bash.bashrc and emits multiple terminal escape sequences but does not appear to enclose them in the required \[ and \]. The comment on its definition is "Set xterm prompt with short path (last 18 characters)". I tried using it in a BASH shell in Konsole, and it yields no prompt at all. I'd probably drop it and directly refer to the values you want in your prompt: $USER, $HOST, $PWD etc. Do you care which terminal you're using (\l is replaced by "the basename of the shell's terminal device name" (search for PS1 in the BASH man page).
Randall Schulz
Thanks - Apart from changing the colours and adding a few aliases for command line package management its the standard Suse .bashrc -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 05 April 2007 09:39, Martin J Hooper wrote:
...
Thanks - Apart from changing the colours and adding a few aliases for command line package management its the standard Suse .bashrc
So, did the modified PS1 I gave you fix the problem? RRS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
On Thursday 05 April 2007 09:39, Martin J Hooper wrote:
...
Thanks - Apart from changing the colours and adding a few aliases for command line package management its the standard Suse .bashrc
So, did the modified PS1 I gave you fix the problem?
RRS
Seems to have done - I need to fine tune the prompt thanks!! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
G.T.Smith
-
Martin J Hooper
-
Randall R Schulz