Bug 171630 - Don't overwrite the prompt set in ~/.zprofile
Summary: Don't overwrite the prompt set in ~/.zprofile
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: zsh
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: James Antill
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-24 16:01 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-29 20:13:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.



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