This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 8518 - unconditional assignment of PS1 in /etc/bashrc problematic
unconditional assignment of PS1 in /etc/bashrc problematic
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-16 14:25 EST by Steve Coile
Modified: 2008-05-01 11:37 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Steve Coile 2000-01-16 14:25:51 EST
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 06:32:59 EST
Fixed in bash1... Reassigning you to whoever owns bash2. ;)
Comment 2 Bernhard Rosenkraenzer 2000-08-08 07:46:41 EDT
done

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