Bug 54509 - Problem with long compound PS1 values
Summary: Problem with long compound PS1 values
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pdksh
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-10 17:54 UTC by ken_laird
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-24 21:36:10 UTC
Embargoed:


Attachments (Terms of Use)

Description ken_laird 2001-10-10 17:54:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12smp i686)

Description of problem:
If a user sets their PS1 value to PS1="<${MACHINE#hpspk}:"'${PWD}'"> "  and
then cd's down a very long directory path such that the length of the
resulting prompt nears 80 characters,  characters no longer echo on the
command line.  If you cd a step or two back up the directory path, echoing
of characters typed returns.
If you create a PS1 value that is a very long simple string instead of a
compound value as above, the shell shifts the prompt to the left to make
room for command-line typing.  And the command line shifts left as needed
as you type.
So the problem only seems to be with a compound PS1 value.  The Bash shell
seems to handle this without the problem.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Set  your PS1 value to something like that listed above
2.cd down a long directory path such that it will take close to 80
characters to display
3. Then try typing something at the command line.
	

Actual Results:  Command line characters are not echoed when the compound
PS1 prompt value gets very long.

Expected Results:  Expected prompt to either wrap or shift left to
accomodate.

Additional info:

Comment 1 Trond Eivind Glomsrxd 2001-10-19 19:09:34 UTC
Verified.

Comment 2 Karsten Hopp 2004-08-24 21:36:10 UTC
I see no sense in having a prompt which is so long that it needs to 
wrap. Easy fix: don't do that. Strip the prompt to the last or the 
last two directories. This is sufficient to know your current working 
directory. 


Note You need to log in before you can comment on or make changes to this bug.