FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-28-2011, 04:05 PM
Jimmy Wu
 
Default bash prompt W (working dir) garbled

I'm getting weird behavior with my bash prompt. Here's some of the
things I see on my system.

$ bash # start a new shell
$ PS1='W '
~ cd /home
hmee cd /media
meiia cd /boot
bott cd /lib32
li332 cd /selinux
selinux cd /proc
pocc cd
~ mkdir home && cd home
home cd .. && rmdir home
~ mkdir media && cd media
media cd .. && rmdir media

As you can see W gets garbled in sub-directories of /. The three
letter directories are fine as is /selinux, but the 4 and 5 letter
ones are messed up. PS1='w ' works fine. It does not seem to be
related to the terminal emulator - I've seen the same behavior in
urxvt and a gnome-terminal over ssh. I have no idea where to begin to
diagnose this.

Running Debian AMD64 Squeeze on a Thinkpad T61
echo $BASH_VERSINFO
4
echo $BASH_VERSION
4.1.5(1)-release
bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
...

Any suggestions pointing me in the right direction would be greatly
appreciated. Thanks in advance.

Jimmy


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTikYCErqJbx5iS3F1MU8g0xPvof62A@mail.gmail.com ">http://lists.debian.org/BANLkTikYCErqJbx5iS3F1MU8g0xPvof62A@mail.gmail.com
 
Old 04-28-2011, 05:02 PM
Jochen Schulz
 
Default bash prompt W (working dir) garbled

Jimmy Wu:
>
> $ PS1='W '
> ~ cd /home
> hmee cd /media
> meiia cd /boot

Same here, on squeeze and sid (both amd64, just as yours). It's already
reported as #589084. A link to a patch is included, in case you want to
rebuild bash yourself.

J.
--
I worry about people thinking I have lost direction.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 04-28-2011, 05:21 PM
Andrew McGlashan
 
Default bash prompt W (working dir) garbled

Jochen Schulz wrote:

Jimmy Wu:

$ PS1='W '
~ cd /home
hmee cd /media
meiia cd /boot




Mine doesn't use W but it works well for me.

I don't have the problem with this testing:

# export PS1='W '
~ cd /proc
proc cd /etc
etc cd
~ cd /home
home cd /var
var cd /media
media




I like having a wide, informative and colorful prompt string, with a new
line to start typing in .... ;-)



# echo $PS1
[33[1;37m][ Affinity --
[33[1;33m]u[33[1;37m]@[33[1;32m]h[33[1;37m]:[33[1;31m]w[33[1;36m][33[1;37m]
]
$ [33[0m] [33];$1u@h:w07]

[ Affinity -- root@hp-dl380g4-a:/etc ]
# cat /etc/debian_version
6.0.1


Here's my setup code in my .bashrc file:

if [ $TERM = 'xterm' -o $TERM = 'screen' ]
then
export PS1='[33[1;37m][ Affinity --
[33[1;33m]u[33[1;37m]@[33[1;32m]h[33[1;37m]:[33[1;31m]w[33[1;36m][33[1;37m]
]
$ [33[0m] [33];$1u@h:w07]'

else
export PS1='h:w$ '
fi



--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DB9A21D.9060403@affinityvision.com.au">http://lists.debian.org/4DB9A21D.9060403@affinityvision.com.au
 
Old 04-28-2011, 05:26 PM
Jimmy Wu
 
Default bash prompt W (working dir) garbled

Thank you very much for that. Now I know what is going on -- the
search terms I was using before were not turning up anything useful.

On Thu, Apr 28, 2011 at 13:02, Jochen Schulz <ml@well-adjusted.de> wrote:
> Jimmy Wu:
>>
>> $ PS1='W '
>> ~ cd /home
>> hmee cd /media
>> meiia cd /boot
>
> Same here, on squeeze and sid (both amd64, just as yours). It's already
> reported as #589084. A link to a patch is included, in case you want to
> rebuild bash yourself.
>
> J.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTinEpPq+R_2E3XR5UnXrw=0revptig@mail.gmail.com ">http://lists.debian.org/BANLkTinEpPq+R_2E3XR5UnXrw=0revptig@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 09:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org