bash prompt \W (working dir) garbled

2011-04-28 Thread Jimmy Wu
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

Re: bash prompt \W (working dir) garbled

2011-04-28 Thread Jochen Schulz
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.

Re: bash prompt \W (working dir) garbled

2011-04-28 Thread Andrew McGlashan
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

Re: bash prompt \W (working dir) garbled

2011-04-28 Thread Jimmy Wu
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 m...@well-adjusted.de wrote: Jimmy Wu: $ PS1='\W ' ~ cd /home hmee cd /media meiia cd /boot Same here, on

Re: Where is Bash Prompt Set??

2010-02-17 Thread Jon Dowland
On Thu, Feb 11, 2010 at 10:20:47PM -0600, Stan Hoeppner wrote: It works for me. I use this: /root/.bashrc export PS1=$(tput setaf 1)[\T]$(tput setaf 1)[...@\h]$(tput sgr0)\w$ /home/stan/.bashrc if [ $PS1 ]; then PS1=$(tput setaf 2)[\T]$(tput setaf 2)[...@\h]$(tput sgr0)\w$ fi The

Re: Where is Bash Prompt Set??

2010-02-17 Thread Jon Dowland
On Wed, Feb 17, 2010 at 09:48:32AM +, Jon Dowland wrote: This is a bit slow, mind, if you really want to change the text colour for the root user then you should unwind the control characters instead by preserving the older PS1 and keeping track of which control sequences you've opened:

Re: Where is Bash Prompt Set??

2010-02-17 Thread Stan Hoeppner
Jon Dowland put forth on 2/17/2010 3:48 AM: On Thu, Feb 11, 2010 at 10:20:47PM -0600, Stan Hoeppner wrote: It works for me. I use this: /root/.bashrc export PS1=$(tput setaf 1)[\T]$(tput setaf 1)[...@\h]$(tput sgr0)\w$ /home/stan/.bashrc if [ $PS1 ]; then PS1=$(tput setaf

Re: Where is Bash Prompt Set??

2010-02-17 Thread Jon Dowland
On Wed, Feb 17, 2010 at 04:59:33AM -0600, Stan Hoeppner wrote: Why is this a problem? If I'm not logged in, why does this shell setup code need to be invoked. Makes perfect sense to me that it is only invoked on login. Am I missing something? I should clarify. This is only a problem if

Re: Where is Bash Prompt Set??

2010-02-13 Thread Tony van der Hoff
On 12/02/10 04:20, Stan Hoeppner wrote: Tony van der Hoff put forth on 2/11/2010 11:53 AM: Thanks for your help, everyone. -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of

Re: Where is Bash Prompt Set??

2010-02-11 Thread Jon Dowland
On Wed, Feb 10, 2010 at 09:47:56PM -0600, Stan Hoeppner wrote: An author of technical documentation should never rely on the ability of the reader to pick up on the subtle one character difference of $ or # in a command line example. The subtlty of the difference depends on the length of your

Re: Where is Bash Prompt Set??

2010-02-11 Thread Scott
Apologies that this won't be properly threaded, but I just got my subscription problems solved. I am the OP on this thread, and have read the replies in the archive. Looking at the bash manual I see that, for a login shell, /etc/profile is sourced, and then ~/.bash_profile, whereas for an

Re: Where is Bash Prompt Set??

2010-02-11 Thread John
On 11/02/10, Jon Dowland (j...@debian.org) wrote: | ... | I've never met a bash that displays anything other than '#' | for '\$' in PS1. Can you give an example of one that does? From .bashrc: # root; red #export PS1='\[\033[0;31...@\w# \]' # sid: green export PS1='\[\033[0;32...@\w$ \]' #

Re: Where is Bash Prompt Set??

2010-02-11 Thread Boyd Stephen Smith Jr.
On Thursday 11 February 2010 11:16:15 John wrote: On 11/02/10, Jon Dowland (j...@debian.org) wrote: | I've never met a bash that displays anything other than '#' | for '\$' in PS1. Can you give an example of one that does? From .bashrc: # root; red #export PS1='\[\033[0;31...@\w# \]' #

Re: Where is Bash Prompt Set??

2010-02-11 Thread Tony van der Hoff
On 11/02/10 17:16, John wrote: On 11/02/10, Jon Dowland (j...@debian.org) wrote: | ... | I've never met a bash that displays anything other than '#' | for '\$' in PS1. Can you give an example of one that does? From .bashrc: # root; red #export PS1='\[\033[0;31...@\w# \]' Very useful

Re: Where is Bash Prompt Set??

2010-02-11 Thread John
On 11/02/10, Tony van der Hoff (t...@vanderhoff.org) wrote: | ... | PS - where are these escape sequences documented, please? http://www.linuxfocus.org/English/May2004/article335.shtml -- johnrchamp...@columbus.rr.com GPG key 1024D/99421A63

Re: Where is Bash Prompt Set??

2010-02-11 Thread Stan Hoeppner
Jon Dowland put forth on 2/11/2010 7:45 AM: to denote. If in doubt, be explicit in your preamble. This was my point. However, for a document writer, doubt, stupidity, not enough coffee in the readers' belly and thus not enough caffeine in the brain should always be assumed. Thus, it should

Re: Where is Bash Prompt Set??

2010-02-11 Thread Stan Hoeppner
Tony van der Hoff put forth on 2/11/2010 11:53 AM: So, I've set my PS1 in /root/.bashrc as suggested. From my user shell, I do 'su', and the prompt, and everything following is in red - good! CTRL-D returns me to my user shell, and everything is still red - bad! CTRL-D is new to me. Thanks

Re: Where is Bash Prompt Set??

2010-02-10 Thread Johannes Wiedersich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stan Hoeppner wrote: Maybe you misunderstood my example shell prompt code. [11:14:14][s...@greer]/etc/postfix$ [11:16:09][r...@greer]/etc/postfix$ There. No color. Root does has a different prompt. The prompt says root instead of user.

Re: Where is Bash Prompt Set??

2010-02-10 Thread Jon Dowland
On Wed, Feb 10, 2010 at 06:17:20AM +, Tom Furie wrote: I think the point is that it's a lot easier to overlook root buried somewhere in the middle of a long prompt than it is to overlook a # right next to the cursor. Stan's example is trivially fixed by replacing the static '$' with '\$'

Re: Where is Bash Prompt Set??

2010-02-10 Thread Stan Hoeppner
Tom Furie put forth on 2/10/2010 12:17 AM: On Tue, Feb 09, 2010 at 11:22:03PM -0600, Stan Hoeppner wrote: Maybe you misunderstood my example shell prompt code. Or maybe I'm just not understanding what you're saying. Here, copy/pasted from a Putty terminal session. Not a doc-file, but

Re: Where is Bash Prompt Set??

2010-02-09 Thread Clive Standbridge
Hi, I'm new to debian, but not to linux. (experimenting with lenny...) This is the question I asked myself while seeing various prompts after I thought I had customised them. Near as I can tell, there are three different scripts which fiddle with the default bash prompt: /etc/profile

Re: Where is Bash Prompt Set??

2010-02-09 Thread Johannes Wiedersich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stan Hoeppner wrote: Also, I've always _hated_ that # for root's prompt, so I killed it and use a $ now. No need for it since root is now all red. :) FWIW, if I document my work, eg. by copy-pasting the command into a doc-file, the color

Re: Where is Bash Prompt Set??

2010-02-09 Thread Stan Hoeppner
Johannes Wiedersich put forth on 2/9/2010 11:09 AM: Stan Hoeppner wrote: Also, I've always _hated_ that # for root's prompt, so I killed it and use a $ now. No need for it since root is now all red. :) FWIW, if I document my work, eg. by copy-pasting the command into a doc-file, the

Re: Where is Bash Prompt Set??

2010-02-09 Thread Tom Furie
On Tue, Feb 09, 2010 at 11:22:03PM -0600, Stan Hoeppner wrote: Maybe you misunderstood my example shell prompt code. Or maybe I'm just not understanding what you're saying. Here, copy/pasted from a Putty terminal session. Not a doc-file, but demonstrates your example nonetheless.

Where is Bash Prompt Set??

2010-02-08 Thread Scott
Hi, I'm new to debian, but not to linux. (experimenting with lenny...) This is the question I asked myself while seeing various prompts after I thought I had customised them. Near as I can tell, there are three different scripts which fiddle with the default bash prompt: /etc/profile /etc

Re: Where is Bash Prompt Set??

2010-02-08 Thread Boyd Stephen Smith Jr.
with the default bash prompt: /etc/profile /etc/bashrc ~/.bashrc You forgot ~/.bash_profile. It is recommended that ~/.bash_profile source ~/.bashrc, but it is not required. {why is root's .bashrc read twice? Why no leading - on original root prompt? Why does /etc/profile

Re: Where is Bash Prompt Set??

2010-02-08 Thread Stan Hoeppner
with the default bash prompt: /etc/profile /etc/bashrc ~/.bashrc .bashrc works for me for both root and users. I used these docs as a spring board: http://news.softpedia.com/news/How-to-Customize-the-Shell-Prompt-40033.shtml I don't use desktop Linux. My Lenny servers are basically headless (KVM

[SOLVED] bash prompt won't wrap properly

2007-04-16 Thread Tyler Smith
On 2007-04-16, Tyler Smith [EMAIL PROTECTED] wrote: On 2007-04-15, Gerard Robin [EMAIL PROTECTED] wrote: I encountered the same problem and I solved it adding \]\n[\ in my PS1. my PS1: PS1=${magenta}[\[$TIME\] [EMAIL PROTECTED] \[${BLUE}\]\#\[$NC\]]\w\$ hth. That's interesting. If I

bash prompt won't wrap properly

2007-04-15 Thread Tyler Smith
Hi, I've modified my bash prompt to display the number of minutes of battery time left. I use the following code in my .bashrc: ## alias bt=acpi | awk '{print \$5}' | awk -F : '{print \$1*60 + \$2}' # set a fancy prompt (non-color, unless we know we want color) case $TERM in xterm

Re: bash prompt won't wrap properly

2007-04-15 Thread Gerard Robin
On Sun, Apr 15, 2007 at 09:15:52PM +, Tyler Smith wrote: From: Tyler Smith [EMAIL PROTECTED] To: debian-user@lists.debian.org Subject: bash prompt won't wrap properly X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-26) on murphy.debian.org X-Spam-Level: X-Spam-Status: No, score=-1.3

Re: bash prompt won't wrap properly

2007-04-15 Thread Tyler Smith
On 2007-04-15, Gerard Robin [EMAIL PROTECTED] wrote: I encountered the same problem and I solved it adding \]\n[\ in my PS1. my PS1: PS1=${magenta}[\[$TIME\] [EMAIL PROTECTED] \[${BLUE}\]\#\[$NC\]]\w\$ hth. That's interesting. If I put the \n at the end of my prompt it works right. If

Automatic timing via bash prompt

2006-09-08 Thread Igor
To time a command in bash one can type: $ time command args... and get the output: real0m0.026s user0m0.003s sys 0m0.002s Is it possible to capture this timing information automatically for each command and display it as part of the bash prompt? If not bash, then maybe some

RE: Can't set bash prompt

2006-05-26 Thread Jorge Peixoto
bash prompt. ... If you're using Debian 3.1, take a look at /etc/profile. I have a script cvsenv which sets up environment variables for CVS usage. It also changes my Bash prompt (PS1). On fresh installs of Debian 3.1, /etc/profile interferes with the later function and I have

RE: Can't set bash prompt

2006-05-24 Thread David Christensen
Jorge Peixoto wrote: One of the users of this machine has a wrong bash prompt. ... If you're using Debian 3.1, take a look at /etc/profile. I have a script cvsenv which sets up environment variables for CVS usage. It also changes my Bash prompt (PS1). On fresh installs of Debian 3.1, /etc

Can't set bash prompt

2006-05-23 Thread Jorge Peixoto
One of the users of this machine has a wrong bash prompt. It works well on a virtual console, but on xterm or gnome-terminal, PS1 is set to \s-\v\$ , which is very unhelpful. But this user's .bashrc is identical to mine (as told by md5sum), and I don't have this problem, so I don't know what to do

Re: Can't set bash prompt

2006-05-23 Thread s. keeling
Jorge Peixoto [EMAIL PROTECTED]: One of the users of this machine has a wrong bash prompt. It works well on a virtual console, but on xterm or gnome-terminal, PS1 is set to \s-\v\$ , which is very unhelpful. But this user's .bashrc is identical to mine (as told by md5sum), and I don't

Re: chroot bash prompt - was ist die Idee dabei?

2004-10-07 Thread Jhair Tocancipa Triana
Hi, Hallo zusammen, in sarge findet sich seit kurzem folgende Zeile: ,[ /etc/bash.bashrc | PS1='${debian_chroot:+($debian_chroot)[EMAIL PROTECTED]:\w\$ ' ` Nach einem , | # export debian_chroot=unstable ` Hat man dann auch ungefähr so einen Prompt: , |

chroot bash prompt - was ist die Idee dabei?

2004-10-06 Thread Thorsten Gunkel
Hallo zusammen, in sarge findet sich seit kurzem folgende Zeile: ,[ /etc/bash.bashrc | PS1='${debian_chroot:+($debian_chroot)[EMAIL PROTECTED]:\w\$ ' ` Nach einem , | # export debian_chroot=unstable ` Hat man dann auch ungefähr so einen Prompt: , | (unstable)[EMAIL

colored bash prompt

2004-08-09 Thread Will Trillich
in there for a while. good modular solution! i've been using perl's Term::ANSIColor module, which is really hard-wired cheat-code, but it works for the most part. Sounds interesting, but any syntax examples? I couldn't make heads or tails of it. Here's a bash prompt I used for a while. It makes

Re: From-PowerUp-To-Bash-Prompt-HOWTO-2

2004-07-25 Thread egd
probably you're using vfat filesystem type. try to mount manually with root and the options below. mke2fs -m0 /dev/fd0 mount -t ext2 -o noauto,dev,rw,suid /dev/fd0 /mnt mkdir /mnt/{boot,dev} cp /boot/boot.b /mnt/boot cd /mnt/dev mknod fd0 b 2 0 mknod console c 5 1

From-PowerUp-To-Bash-Prompt-HOWTO-2

2003-08-19 Thread Valter G. Nogueira Jr.
I am following the From-PowerUp-To-Bash-Prompt-HOWTO-2 along with Pocket-Linux-Guide, but I am unable to execute some exercises. From-PowerUp asks to 1. Hexedit unios - but the link is broken 2. Install lilo on a floppy disk The second is step is acomplished by Pocket-Linux, but when I

Starting bash prompt in vi-command mode

2003-01-14 Thread Jayme Johnston
Does anyone know how to get each bash prompt to start in vi-command mode. bind -V always shows keymap set to vi-insert even when set keymap vi-command is in the the .inputrc --Jayme -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Bash Prompt

2002-11-12 Thread ciriso
Buenas. Alguien sabe que ha sido del paquete Bash Prompt ? En http://bash.current.nu no contesta nadie. Gracias y un saludo. César a.k.a insallah

Re: Bash Prompt spinnt - ein Bug?

2002-07-24 Thread Michelle Konzack
Hmmm, Hatte das auch verwendet, aber jedesmal wenn ich mc aufgerufen habe und wieder verließ, war es aus mit bunt Woran kann das liegen ??? Verwende die 26 WOODY-Disketten plus mc und ein paar Proggies für meine Win/TV-PCI. Michelle Am 12:03 13/07/2002 +0200 hat Sacher Khoudari

Re: Bash Prompt spinnt - ein Bug?

2002-07-12 Thread Dirk Haage
Am Fre, 2002-07-12 um 18.40 schrieb Sacher Khoudari: Hi Leute! Ich habe mir den Bash-Promt etwas eingefärbt, aber nun spinnt er wenn ich ne zu lange kommandozeile habe und eigentlich ein Zeilenumbruch kommen soll. Der Cursor springt zwar an die erste Spalte, bleibt aber in der selben Zeile

Re: Bash Prompt spinnt - ein Bug?

2002-07-12 Thread Reinhard Foerster
On Fri, 12 Jul 2002 18:40:43 +0200, Sacher Khoudari wrote: Ich habe mir den Bash-Promt etwas eingefärbt, aber nun spinnt er wenn ich ne zu lange kommandozeile habe und eigentlich ein Zeilenumbruch kommen soll. Der Cursor springt zwar an die erste Spalte, bleibt aber in der selben Zeile

Re: Bash Prompt spinnt - ein Bug?

2002-07-12 Thread Reinhard Foerster
On Sat, 13 Jul 2002 03:33:52 +0200, Dirk Haage wrote: manchmal auch: - Befehl eintippen - Fenster vergrößern - Befehl bestätigen Da es zu selten passiert, bin ich noch nicht auf Ursachensuche gegangen, aber vielleicht hast du ja auch sowas gemacht und es liegt gar nicht am Prompt.

Re: bash prompt

2001-09-21 Thread Mike Pfleger
Timothy and Paul: Thanks so very much for this thread. There is so much to learn and so little time; it's always a pleasure to find little gems like this as they float by on the list. My terms now have hostname-empowered titlebars :) Cheers, Mike Pfleger There's seventy brilliant people on

Re: bash prompt

2001-09-20 Thread W. Paul Mills
this: \[\e]0;[EMAIL PROTECTED]:\w\$ [EMAIL PROTECTED] (Timothy H. Keitt) writes: Quick question: the following bash prompt puts the current machine name in the xterm (gnome-terminal) title bar, but also causes long lines to wrap incorrectly. Instead of moving down a line, the wrap over-writes

Re: bash prompt

2001-09-20 Thread Timothy H. Keitt
characters So, try this: \[\e]0;[EMAIL PROTECTED]:\w\$ [EMAIL PROTECTED] (Timothy H. Keitt) writes: Quick question: the following bash prompt puts the current machine name in the xterm (gnome-terminal) title bar, but also causes long lines to wrap incorrectly. Instead of moving

bash prompt

2001-09-19 Thread Timothy H. Keitt
Quick question: the following bash prompt puts the current machine name in the xterm (gnome-terminal) title bar, but also causes long lines to wrap incorrectly. Instead of moving down a line, the wrap over-writes the existing line of text. Anyone have a solution? Here's the prompt string

Re: bash prompt

2001-09-19 Thread dman
On Wed, Sep 19, 2001 at 06:33:09PM -0400, Timothy H. Keitt wrote: | Quick question: the following bash prompt puts the current machine name | in the xterm (gnome-terminal) title bar, but also causes long lines to | wrap incorrectly. Instead of moving down a line, the wrap over-writes

Re: Strange bash prompt

1999-09-23 Thread ferret
I don't know if it's related or not, but when I do something like 'cd /usr/local/../../var/log ; echo $PWD' I get '//var/log' Bash 2.01.1(1)-release On Wed, 22 Sep 1999, Keith Harbaugh wrote: On Wed, 1999-09-22 10:25:29 +0530, XRDLAB wrote: Hi, I noticed a strange behaviour of bash

Strange bash prompt

1999-09-22 Thread XRDLAB
Hi, I noticed a strange behaviour of bash regrding the prompt. I have set PS1='\h:\w$ '. With that I get both the host name and the working directory as my shell prompt. Yesterday I noticed a strange behaviour accidentally. The sequence is given below: mysxrd:~$ cd /var mysxrd:/var$

Re: Strange bash prompt

1999-09-22 Thread Kent West
XRDLAB wrote: Hi, I noticed a strange behaviour of bash regrding the prompt. I have set PS1='\h:\w$ '. With that I get both the host name and the working directory as my shell prompt. Yesterday I noticed a strange behaviour accidentally. The sequence is given below: mysxrd:~$ cd /var

Re: Strange bash prompt

1999-09-22 Thread Keith Harbaugh
On Wed, 1999-09-22 10:25:29 +0530, XRDLAB wrote: Hi, I noticed a strange behaviour of bash regrding the prompt. I have set PS1='\h:\w$ '. With that I get both the host name and the working directory as my shell prompt. Yesterday I noticed a strange behaviour accidentally. The sequence is

Re: Bash Prompt in an XTerm

1997-07-23 Thread Benoit Goudreault-Emond
From: Travis Cole [EMAIL PROTECTED] To: debian-user@lists.debian.org Subject: Bash Prompt in an XTerm [snip] This works fine when I am at the console as a normal user but as root I only get: atheist# Check root's .bash_profile (and possibly .bashrc). It is probably overriding the default prompt

Bash Prompt in an XTerm

1997-07-22 Thread Travis Cole
-BEGIN PGP SIGNED MESSAGE- I just switched from Red Hat 4.2 to Debian 1.3.1 and I am now realizing how much Red Hat really hides you from things. I don't like the default setting for the bash prompt Debian give you and I want to change it. I edited my /etc/profile and added the line

Re: Bash Prompt and XTerms

1997-07-22 Thread Travis Cole
-BEGIN PGP SIGNED MESSAGE- Im replying to my own post. I figured it out. Just add the PS1 line to my .bashrc. I figure stuff like that would just go in the .bash_profile and when that didn't work I had no idea what to do. To make it all global I will just make a /etc/bashrc Sorry for

RedHat vs Debian (was Re: Bash Prompt in an XTerm)

1997-07-22 Thread David M
Hiya Travis, I just switched from Red Hat 4.2 to Debian 1.3.1 and I am now realizing how much Red Hat really hides you from things. I was trying to decide what distribution to install (RedHat versus Debian) just b4 I shifted to Linux. I must say in the beginning I was very much inclined at

Re: RedHat vs Debian (was Re: Bash Prompt in an XTerm)

1997-07-22 Thread Rick Hawkins
My question to you is how do you find them (which one do you think is best; if there is such a thing as 'best'). Any particular features etc you prefer on one over the other? Redhat is *far* easier to install on a slow machine. After installation is another matter :) Redhat's

Re: RedHat vs Debian (was Re: Bash Prompt in an XTerm)

1997-07-22 Thread Bob Nielsen
On Tue, 22 Jul 1997, Rick Hawkins wrote: Redhat is *far* easier to install on a slow machine. After installation is another matter :) Slightly faster; not necessarily easier. Since 4.0, Red Hat has been a disaster for anyone with a CD-ROM attached to a SoundBlaster card, for instance.

Re: RedHat vs Debian (was Re: Bash Prompt in an XTerm)

1997-07-22 Thread Rick Hawkins
Redhat is *far* easier to install on a slow machine. After installation is another matter :) Slightly faster; not necessarily easier. Since 4.0, Red Hat has been a disaster for anyone with a CD-ROM attached to a SoundBlaster card, for instance. this was a future domain. But on the

Re: RedHat vs Debian (was Re: Bash Prompt in an XTerm)

1997-07-22 Thread Lester P. Wang
for Applixware. My email and ppp server is Debian. The configuration tools that come with Debian are easier since I don't have X-windows running -- From: Rick Hawkins [EMAIL PROTECTED] To: debian-user@lists.debian.org Subject: Re: RedHat vs Debian (was Re: Bash Prompt in an XTerm) Date