Bug 2026749 - PS1 can't be overwritten by scripts in /etc/profile.d for login shells
Summary: PS1 can't be overwritten by scripts in /etc/profile.d for login shells
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2026895
TreeView+ depends on / blocked
 
Reported: 2021-11-25 18:03 UTC by Debarshi Ray
Modified: 2022-02-10 11:37 UTC (History)
5 users (show)

Fixed In Version: zsh-5.8-7.fc36
Clone Of:
Environment:
Last Closed: 2021-12-01 09:03:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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!


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