Last active
May 27, 2024 17:50
-
-
Save nidegen/1544e174cce3ef5fa750917b5a4b52c3 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
autoload -Uz compinit && compinit | |
# Load version control information | |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
# Format the vcs_info_msg_0_ variable | |
zstyle ':vcs_info:git:*' formats '%F{yellow}(%b)%f' | |
# Enable tab completion for `..` and `.` | |
zstyle ':completion:*' special-dirs true | |
# Set up the prompt (with git branch name) | |
setopt PROMPT_SUBST | |
PROMPT='%n@%m %2~ ${vcs_info_msg_0_}%# ' | |
############################################################# | |
#CURRENT | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/(\1)/p' | |
} | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' | |
COLOR_DEF='%f' | |
COLOR_USR='%F{243}' | |
COLOR_DIR='%F{green}' | |
COLOR_GIT='%F{yellow}' | |
# About the prefixed `$`: https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_03.html#:~:text=Words%20in%20the%20form%20%22%24',by%20the%20ANSI%2DC%20standard. | |
NEWLINE=$'\n' | |
# Set zsh option for prompt substitution | |
setopt PROMPT_SUBST | |
# export PROMPT='${COLOR_USR}%n@%M ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% ' | |
export PROMPT='${COLOR_USR}%* %W ${COLOR_DIR}%2d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}%% ' | |
HISTSIZE=1000000 | |
setopt hist_ignore_all_dups | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/Users/nicolas/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/nicolas/google-cloud-sdk/path.zsh.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/Users/nicolas/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/nicolas/google-cloud-sdk/completion.zsh.inc'; fi | |
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home | |
PATH=$PATH:/Users/nicolas/.mint/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment