Skip to content

Instantly share code, notes, and snippets.

@Deliaz
Created January 25, 2023 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deliaz/2d40e9ed666057d7aa913825b315d1fb to your computer and use it in GitHub Desktop.
Save Deliaz/2d40e9ed666057d7aa913825b315d1fb to your computer and use it in GitHub Desktop.
#CUSTOM
# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats ' (%b)'
setopt PROMPT_SUBST
PROMPT=$'%B%(?.%F{green}✔.%F{red}✘) %F{cyan}%* %F{green}[%(!.%F{red}.%F{yellow})%n%F{red}@%F{red}%m%F{red} %F{cyan}%~%F{green}${vcs_info_msg_0_}] \n%F{blue}%(!.#.$) %f%b'
@Deliaz
Copy link
Author

Deliaz commented Jan 25, 2023

Outputs:

✔ 10:44:20 [user@machine ~/code (main)] 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment