Bug 463167
Summary: | %M and %m expansions don't work anymore | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mathieu Chouquet-Stringer <mathieu-acct> |
Component: | zsh | Assignee: | James Antill <james.antill> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-09-25 11:15:47 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
Mathieu Chouquet-Stringer
2008-09-22 13:36:32 UTC
% print -P "%M %m" code.and.org code % yum list zsh Installed Packages zsh.x86_64 4.3.4-8.fc9 installed ...got anymore info? zsh.i386 4.3.4-8.fc9 installed On my machine (I've got another one at home): %hostname foobar %print -P "%M" % And foobar is in /etc/hosts (I mean a getent ahosts foobar works)... I guess I'm going to dig in the source... BY the way I also tried to move my .zshrc out of the way, same result... Ok, interesting ... if I do "zsh -f" then print "%M" just prints %M. PROMPT EXPANSION Prompt sequences undergo a special form of expansion. This type of expansion is also available using the -P option to the print builtin. ...and print -P "%M" works in zsh -f. Nice find, with zsh -f, print -P "%M" works again... Found the culprit, I added this to zshrc: --- zshrc.orig 2008-05-16 06:17:09.000000000 +0200 +++ zshrc 2008-09-24 11:10:39.000000000 +0200 @@ -26,7 +26,9 @@ if [[ ! -o login ]]; then # We're not a login shell for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then + echo $i . $i + print -P "%M %m" fi done unset i And basically it stops here: tangerine tangerine /etc/profile.d/keychain.sh So keychain seems to be at fault. The issue is this line: unset KCHOPTS SSHKEYS GPGKEYS HOST If you unset HOST, print -P "%M" (or %m) fails... %echo $HOST %print -P "%m %M" %HOST=foobar %print -P "%m %M" foobar foobar Can we transfer this bug to keychain instead of rpm? I meant "transfer to keychain instead of zsh" of course... Closed (new bug is 463913). |