You are not logged in.
Pages: 1
Hello,
Ive recently restored my arch system from a backup due to some problems. However I am now having an issue with my zsh prompt.
I have a .zshrc file in my home dir that was always obeyed by zsh before. Now when I log in the ~/.zshrc file is loaded because all my aliases still work but my prompt is not the one specified in ~/.zshrc file.
If I copy ~/.zshrc to /etc/zsh/zshrc then the prompt is loaded along with all the other aliases etc.
Can anyone suggest why this maybe as id like to keep the zsh settings on a per-user basis?
Thanks
EDIT: Sorry fixed by reinstalling zsh
Last edited by ck3mp (2013-04-07 13:01:27)
Offline
Can you post your zshrc and a text snippet of how the prompt actually looks?
All the best,
-HG
Last edited by HalosGhost (2013-04-07 12:47:38)
Offline
Not sure why I didnt try this but a reinstall of the zsh package fixed it all. Thank you.
Offline
Not sure why I didnt try this but a reinstall of the zsh package fixed it all. Thank you.
Glad you got it worked out. Please add [Solved] to the beginning of your thread title.
All the best,
-HG
Offline
Not sure if this is directly relevant to your situation or not, but I encountered a very similar issue starting the other week; loading promptinit and selecting a theme would work, but setting a custom PS1= etc. through my ~/.zshrc no longer did, even though it was still being loaded. I similarly did not think to re-install the package, until I came across this thread. As part of doing so I had to remove several packages with a Zsh dependency. After re-installing Zsh, my normal PS1 etc. came back, but went away again after re-installing the other packages.
In my case, it appears extra/grml-zsh-config was the culprit; this package adds a lengthy /etc/zsh/zshrc, and the behaviour occurs when that file is present. I couldn't say if this is a bug or just intended behaviour (indeed, I only had GRML-Zsh-Config installed as a dependency for another package); either way, once identified, workarounds became possible.
Would be curious to know if this was also the case at your end (and if not, well... it seems there are a number of ways one can lose their Zsh prompt configuration!)
Offline
I couldn't say if this is a bug or just intended behaviour (indeed, I only had GRML-Zsh-Config installed as a dependency for another package); either way, once identified, workarounds became possible.
A note to people who like customisation: If you are not using a prompt
theme for your customisation, but you're either statically setting $PS1
(or $PROMPT) or you're constructing one of those variables in zsh's
\`precmd()' function, make sure you are turning the zsh's prompt theme
system off before doing so. A correct example customisation could look
like this:# Turn the prompt system off:
prompt off
# Customise the prompt yourself:
PS1='%~ %# '
Offline
Having updated my config, I'm now in the process of writing "RTFM" a thousand times on the whiteboard... and the nearby wall... and some sticky notes... and my forehead...
Much obliged for pointing that out, sano
.
Offline
I am glad I could be of help. To be honest, it took me more than one hour until it occurred to me that maybe the manual could provide some solution. ![]()
Offline
In my .zshrc.local, I customize the PROMPT and RPROMPT, but in doing so I use values computed by grml-zsh-config. Basically I move version control info and battery percent (these are ${vcs_info_msg_0_} and ${PERCENT}) to my RPROMPT.
After a recent update, my PROMPT was no longer respected and I found this thread. If I follow sano's advice and add "prompt off" to .zshrc.local, them my changes to PROMPT and RPROMPT work again. however, the ${vcs_info_msg_0_} and ${PERCENT} are not defined.
I'm still looking for a way to get my prompts back to how they once were.
UPDATE: I think I've found the info I need to clean up my prompt, the grml way: http://bewatermyfriend.org/p/2013/001/
Last edited by Dave Cohen (2013-04-09 17:12:18)
Offline
Pages: 1