Someone had a problem with the new prompt theme, which is going to hit other people who use the same sort of customisation as he did. So let's clear this up. If you're doing something like this in your `~/.zshrc.local':

# I want my own prompt!
PS1='%~ %# '

You will have to turn off the grml theme (and any other theme for that matter) beforehand. So your customisation becomes this:

# I want my own prompt!
prompt off
PS1='%~ %# '

I could have seen this coming, but I didn't. The theme system works by registering hooks at the right times to set prompt variables. This way you can jump between prompt themes however you please. "prompt clint" switches to the "clint" prompt, "prompt pws" to "pws" and "prompt grml" switches back to the "grml" theme. While this modularity is wanted within the system, so switching between prompts is possible (even for very complex prompts that do far more than just set $PS1) at relative ease, it conflicts with static prompt settings like the above, because the system takes control over how the prompt is set.

The "prompt off" call tells zsh's theme system to let go of $PS1 (or its synonym $PROMPT) and other prompt related variables, so your static setting will be picked up.

On a similar note, if you construct your prompt in `precmd()', you want to turn the theme system off, too.

If you have further questions or problems regarding the new prompt in grml's zshrc, drop by "#grml" on the freenode IRC network and tell us.

Posted Wed 06 Mar 2013 12:08:10 CET Tags: