Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 8518 - unconditional assignment of PS1 in /etc/bashrc problematic
unconditional assignment of PS1 in /etc/bashrc problematic
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
: FutureFeature
Depends On:
  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:
Last Closed: 2000-07-27 14:26:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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"

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

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