Bug 2026749

Summary: PS1 can't be overwritten by scripts in /etc/profile.d for login shells
Product: [Fedora] Fedora Reporter: Debarshi Ray <debarshir>
Component: zshAssignee: Kamil Dudka <kdudka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmaphy, james.antill, j, kdudka, svashisht
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: zsh-5.8-7.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-01 09:03:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2026895    

Description Debarshi Ray 2021-11-25 18:03:05 UTC
When Z shell is run as a login shell, /etc/zshrc unconditionally overwrites the PROMPT after the scripts in /etc/profile.d have been sourced. This prevents Toolbox from prefixing a hexagon indicator to the prompt like it does for Bash.

It might be nicer if /etc/zshrc overwrote the PROMPT only it's set to Z shell's built-in default of '%m%# ', just like it's done in /etc/bashrc.

Comment 1 Debarshi Ray 2021-11-25 18:11:09 UTC
Pull request:
https://src.fedoraproject.org/rpms/zsh/pull-request/5

Comment 2 Kamil Dudka 2021-11-26 07:15:32 UTC
Merged, thanks!

Fedora commit: https://src.fedoraproject.org/rpms/zsh/c/20551698

Comment 3 Debarshi Ray 2021-11-26 11:05:51 UTC
Wow, thanks, Kamil!