home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / shell / 4722 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  1.4 KB

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