Bug 171630

Summary: Don't overwrite the prompt set in ~/.zprofile
Product: Red Hat Enterprise Linux 4 Reporter: Bastien Nocera <bnocera>
Component: zshAssignee: James Antill <james.antill>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: tao
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-29 20:13:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bastien Nocera 2005-10-24 16:01:26 UTC
zsh-4.0.7-1.EL.2

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 Program Management 2006-08-18 17:10:40 UTC
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
release.

Comment 15 James Antill 2006-09-19 22:08:57 UTC
 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:

/etc/zprofile
~/.zprofile

  [ if interactive -- Ie. needs a prompt ]
  /etc/zshrc
  ~/.zshrc

  [ if login shell ]
  /etc/zlogin
  ~/.zlogin

...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.