Bug 8518 - unconditional assignment of PS1 in /etc/bashrc problematic
Summary: unconditional assignment of PS1 in /etc/bashrc problematic
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
(Show other bugs)
Version: 6.1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-16 19:25 UTC by Steve Coile
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-07-27 18:26:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Steve Coile 2000-01-16 19:25:51 UTC
Instead of unconditionally assigning a value to $PS1 in /etc/bashrc,could
we provide some intelligence to it?

	test "${PS1}" = 'bash\$ ' && PS1="[\u@\h \W]\\$ "

This allows the redefinition of $PS1 via the "env" command:

	env PS1='something> ' /bin/bash

which is handy if you have a script that sets up a special environment
(such as an extended $PATH) before dropping the user into a subshell, while
still preserving as much of the the user's own shell preferences as
possible.  The only alternative is to have a specialized bashrc that
invokes the user's own before customing the environment, which is extremely
cumbersome given this simple alternative.

This request also includes any /etc/bashrc included with the "bash2"
package

Thanks.

Comment 1 Bernhard Rosenkraenzer 2000-01-17 11:32:59 UTC
Fixed in bash1... Reassigning you to whoever owns bash2. ;)

Comment 2 Bernhard Rosenkraenzer 2000-08-08 11:46:41 UTC
done


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