From 1452b6db45ae197f48852f34575c20afe1e292ec Mon Sep 17 00:00:00 2001 From: candifloss Date: Mon, 2 Dec 2024 11:15:24 +0530 Subject: [PATCH] Fixed zsh instruction in README --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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