home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!emory!kd4nc!vdbsan!willard!hronr
- From: hronr@willard.UUCP
- Newsgroups: comp.unix.shell
- Subject: newline in bash v1.12 with long PS1
- Message-ID: <yw70TB1w165w@willard.UUCP>
- Date: 15 Nov 92 12:51:45 GMT
- Article-I.D.: willard.yw70TB1w165w
- Organization: Willard's House BBS, Atlanta, GA -- +1 (404) 664 8814
- Lines: 33
-
- I have a long PS1 in bash to display the command number,
- working directory, and more in 4 colors using ansi escape
- sequences.
-
- Roughly:
- PS1=<esc>[0;1;35m\!<esc>[32m${PWD}<esc>[35m$ <esc>[33m
- (the PS1 is single quoted.)
-
- When I am in a deep directory like /usr/spool/lp/admins/lp/interfaces
- and I type a command, bash throws in a newline before I hit <enter>.
-
- For example the command "find / -name "interface*" -print" would
- appear as:
-
- 584/usr/spool/lp/admins/lp/interfaces$ find / -name "in
- terface*" -print
-
- The command executes properly, but I am annoyed by the newline.
- I have used similar long prompts in sh, ksh, and csh and they
- don't do this. I also note that in sh, ksh, and csh you can
- backspace over the prompt. In bash you cannot.
-
- Anyone know a fix or patch for this problem?
- p.s. I'm running AT&T V/386 if that matters.
- Please email responses to uunet!gatech!dscatl!hrandoz!hronr
- if possible. (Haven't got an internet address or a smart
- mailer yet). I read this newsgroup if this subject is of
- general interest to everyone.
-
-
- --
- hronr@willard.UUCP (randy hron)
- Willard's House BBS, Atlanta, GA -- +1 (404) 664 8814
-