You are not logged in.
Just did a pacman -Syu and it fetched bash-4.0.033-1. However now whenever a open a bash shell as a user (not root), my prompt has this at the start:
0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~} (~)
... followed by the usual [user@host ~]$
Now I assume this is caused by this line in profile.bash:
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
export PROMPT_COMMAND
Unfortunately there is no backup of said file, so I have no idea what this line used to look like. I'm going to hazard a guess that "\033]0;" should be a "[", and "\007" should be "]".
Edit: Forgot to mention that I'm using rxvt-unicode for the terminal.
Edit2: It seems the relevant file was /etc/bash.bashrc, and the solution was to simply remove rxvt-unicode from the if statement.
Last edited by ptepid (2009-09-26 11:12:25)
Offline
bash.bashrc won't get sourced on a default arch system.
Where do I report bash.bashrc vs profile.bash? The bug tracker doesn't seem like the proper place.
Since the last bash/bash-completion update, bash-completion doesn't get sourced in by /etc/profile calling /etc/profile.d/. It get's sourced by bash.bashrc, a file that doesn't get sourced by anything!
Offline
I hope this About bashrc will clarify the doubts
Offline
I don't see any problem with the prompt ...
[xavier@xps-m1530 ~]$ source /etc/bash.bashrc
[xavier@xps-m1530 ~]$ echo $TERM
rxvt-unicode
[xavier@xps-m1530 ~]$ echo $PROMPT_COMMAND
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Okay, there's something else going on here. I just happened to be messing with ANSI escape codes for something else and the same issue arose.
For instance
[ptepid@securis ~]$ echo -e "Test1 \033[1;34m Test2 \033[0m"
1;34m Test2 (~)Test1 Test2
[ptepid@securis ~]$That echo statement should print "Test1 Test2" with test2 in blue (not shown here). It does that, but it's also spitting out the escape codes as garbage beforehand.
Turns out only one user is affected. I'm trying to hunt down what is causing it, but I can't find any ENV variables that are different. It's only happening in X, but it's a problem with both rxvt and rxvt-unicode.
SOLVED: Okay, now I feel pretty dumb. It was some bogus code in my .bashrc that was meant to update the titlebar of an xterm. That worked, but it also seems to mess with ANSI escape characters. This was the offending code:
if [[ -n "$DISPLAY" ]]; then
if [[ -n $MRXVT_TABTITLE ]]; then
trap 'echo -ne "\e]61;${BASH_COMMAND//\"/} (${PWD/$HOME/~})\a"' DEBUG
else
trap 'echo -ne "\e]0;${BASH_COMMAND//\"/} (${PWD/$HOME/~})\a"' DEBUG
fi
fiA relic from when I'd used mrxvt.
Last edited by ptepid (2009-09-26 11:11:55)
Offline
Did you try to disable your .Xdefaults / .Xresources / etc settings ?
Edit : and .bashrc of course. lol
Last edited by shining (2009-09-26 11:21:24)
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Did you try to disable your .Xdefaults / .Xresources / etc settings ?
Edit : and .bashrc of course. lol
Hehe, cheers. ![]()
Still not sure why this only occurred after the bash update. I hadn't altered the .bashrc in months.
Offline