Bug 171630 - Don't overwrite the prompt set in ~/.zprofile
Don't overwrite the prompt set in ~/.zprofile
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: zsh (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: James Antill
Mike McLean
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2005-10-24 12:01 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-29 16:13:42 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 Bastien Nocera 2005-10-24 12:01:26 EDT

1. Add a custom PROMPT in ~/.zprofile
2. Login again, the prompt is the default one still

The assignment in /etc/zshrc should read:
PROMPT=${PROMPT:-'[%n@%m]%~%# '} # default prompt if not set
instead of:
PROMPT='[%n@%m]%~%# ' # default prompt
Comment 12 RHEL Product and Program Management 2006-08-18 13:10:40 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 15 James Antill 2006-09-19 18:08:57 EDT
 Why do they want to set their PROMPTs in ~/.zprofile? /etc/profile and
~/.profile (including the .zprofile versions) aren't for things like prompt. The
files get done as:


  [ if interactive -- Ie. needs a prompt ]

  [ if login shell ]

...if they put their prompt changing code into ~/.zshrc (which is what everyone
does) ... they won't have this problem, and it won't be set when it isn't needed
(Ie. non-interactive mode).

 The change is basically free, in that nothing bad could really happen, but I'm
reticent to imply what they are doing is the correct thing.

 I'm going to resolve this as NAB, but if there's a pressing need to hack this
feel free to reopen it.

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