zsh/.zsh/custom-prompt.zsh # ██ # ░██ # ██████ ██████░██ # ░░░░██ ██░░░░ ░██████ # ██ ░░█████ ░██░░░██ # ██ ░░░░░██░██ ░██ # ██████ ██████ ░██ ░██ # ░░░░░░ ░░░░░░ ░░ ░░ # # ▓▓▓▓▓▓▓▓▓▓ # ░▓ author ▓ xero <x@xero.nu> # ░▓ code ▓ http://code.xero.nu/dotfiles # ░▓ mirror ▓ http://git.io/.files # ░▓▓▓▓▓▓▓▓▓▓ # ░░░░░░░░░░ # #█▓▒░ colors for permissions if [[ "$EUID" -ne "0" ]] then # if user is not root USER_LEVEL="%F{cyan}" else # root! USER_LEVEL="%F{red}" fi #█▓▒░ allow functions in the prompt setopt PROMPT_SUBST #█▓▒░ autoload zsh functions fpath=(~/.zsh/functions $fpath) autoload -U ~/.zsh/functions/*(:t) #█▓▒░ enable auto-execution of functions typeset -ga preexec_functions typeset -ga precmd_functions typeset -ga chpwd_functions #█▓▒░ prepend git functions needed for prompt preexec_functions+='preexec_update_git_vars' precmd_functions+='precmd_update_git_vars' chpwd_functions+='chpwd_update_git_vars'