diff --git a/README.md b/README.md index 895303c..37a1073 100644 --- a/README.md +++ b/README.md @@ -96,11 +96,13 @@ end ``` ### `zsh` -Export the `PS1` variable with the output of `prettyprompt $?` as its value. +Use the precmd function to set the `PROMPT` variable with the output of `prettyprompt $?` as its value. User-specific: `~/.zshrc` System-wide: `/etc/zsh/zshrc` -```sh -export PS1="$(prettyprompt $?)" # Notice the double quotes +```zsh +precmd() { + PROMPT="$(prettyprompt $?)" # Notice the double quotes +} ``` ### Other shells