Bug 54509

Summary: Problem with long compound PS1 values
Product: [Retired] Red Hat Linux Reporter: ken_laird
Component: pdkshAssignee: Karsten Hopp <karsten>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-24 21:36:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.