BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000647 [BusyBox] Documentation minor always 01-18-06 00:44 12-22-06 05:08
Reporter iggarpe View Status public  
Assigned To BusyBox
Priority normal Resolution no change required  
Status closed   Product Version svn
Summary 0000647: ash does not handle '\$' in prompt when prompt expansion is enabled
Description If you use ash, and CONFIG_ASH_EXPAND_PRMT is enabled, you'll see '$' in the prompt even if you are root.

I've traced the bug and it seems that prompt expansion turns the default value of PS1='\w \$ ' into PS1='\w $ ', that is, just removes the '\' in front of the '$', thus from there on, '$' is printed as a literal in the prompt. I guess prompt expansion is broken somehow.
Additional Information
Attached Files

- Relationships

- Notes
(0000945)
vodz
01-18-06 01:03

I think, its not bug.
Expanding promt works as eval string.
Example:

1$ bash --version
GNU bash, version 2.05b.0(1)-release (i486-slackware-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
2$ echo `echo '\w'`
\w
3$ echo `echo '\$'`
$
4$ echo `echo '\\$'`
\$

\w is invalid escaping, but \$ - valid. First backslash escaping a dollar char
and evalute without backslash.

If you using EXPAND_PROMPT feature, then must use double escaping shell special chars for give with backslash to the fancy promt decoder.

Please close this bug.
 
(0001921)
bernhardf
12-22-06 05:08

Not a bug.
 

- Issue History
Date Modified Username Field Change
01-18-06 00:44 iggarpe New Issue
01-18-06 00:44 iggarpe Status new => assigned
01-18-06 00:44 iggarpe Assigned To  => BusyBox
01-18-06 00:47 iggarpe Issue Monitored: iggarpe
01-18-06 00:47 iggarpe Issue End Monitor: iggarpe
01-18-06 01:03 vodz Note Added: 0000945
04-10-06 00:29 iggarpe Issue Monitored: iggarpe
04-10-06 00:29 iggarpe Issue End Monitor: iggarpe
12-22-06 05:08 bernhardf Status assigned => closed
12-22-06 05:08 bernhardf Note Added: 0001921
12-22-06 05:08 bernhardf Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker