Last active
February 9, 2023 00:45
-
-
Save eighty4/00884fbd13419bc2e9be7d052d0729c8 to your computer and use it in GitHub Desktop.
Clean zsh shell prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %(?. . ) is a ternary on the prev process exit code | |
# %B starts printing bold text until %b | |
# %F{196} starts printing with a new foreground color until %f | |
# %~ prints cwd using ~ notation for home dir | |
# the shell does not add a space so appending a space is customary | |
PROMPT='%(?. .%F{196}!%f)%B%F{220}%~%f%b ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prompt expansion
256 color chart