Created
February 29, 2020 14:02
-
-
Save m1kah/888381f6d9b907cc295eae5759d53eff to your computer and use it in GitHub Desktop.
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
# zstyle : Instructs the shell on how to provide inline, | |
# contextual hints | |
# fpath : The git-completion.zsh is a function file, | |
# not designed to be sourced like the bash script. | |
# This command appends the ~/.zsh directory onto | |
# the shell’s function lookup list. | |
# autoload : Scan each path within the fpath variable for | |
# files starting with an underscore (_git , in our | |
# case) and loads the corresponding script as a | |
# function file | |
# compinit : Initializes the shell’s auto-completion functionality | |
# | |
# | |
# Auto completion | |
# | |
zstyle ':completion:*:*:git:*' script /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.zsh | |
#source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
source /usr/local/opt/chruby/share/chruby/chruby.sh | |
autoload -U compinit && compinit | |
# | |
# Prompt | |
# | |
#export PS1='\[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\] → ' | |
git_title() { | |
git rev-parse --abbrev-ref HEAD 2>/dev/null | |
} | |
autoload -U colors | |
colors | |
setopt prompt_subst | |
PROMPT='%{$fg[cyan]%}%c %{$fg[yellow]%}$(git_title)%{$fg[cyan]%} → %{$reset_color%}' | |
#RPROMPT='%{$fg[green]%}%1(j.%j.)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment