![]() |
Missing characters in xterm after customizing local .bashrc file.
Hi,
I running Slackware v14 and learning how to customize my xterm by editing my local .bashrc file. The only two entries I have in the file are: Code:
PS1="[\T](\u) \W \$ " What's causing this and how do fix it? TIA |
Quote:
|
Quote:
|
I can't understand why the code:
Code:
PS1="[\T](\u) \W \$ " Cheers. |
I have found that the bash prompt is very sensitive, i.e. one PS1 string will mostly work but a slight change can have drastic consequences. For example, I formatted my prompt with:
Code:
PS1='\e[1;32m\h\e[0m(\e[0;31m\w\e[0m)\e[1;34m\$ \e[0m' Code:
PS1='\[\e[1;32m\]\h\[\e[0m\](\[\e[0;31m\]\w\[\e[0m\])\[\e[1;34m\]\$ \[\e[0m\]' My point is that there are many solutions to your target. Small changes can have large impacts. I suggest trying single quotes in your PS1 string instead of double quotes. |
Try enclosing the value assigned to PS1 in single quotes. There is no purpose to allowing the shell to interpret anything in the string before it is assigned. There are some 'special' characters in the string which might be interpreted/expanded by the shell, which isn't what you want. If you echo $PS1, it should reveal any such translations. Also, type set which may reveal any aliases or functions that might be silently participating in some meddling with the terminal.
--- rod. |
Thanks for all of the responses. The single quotes made it work.
|
All times are GMT -5. The time now is 02:06 AM. |