Last active
July 20, 2020 09:58
-
-
Save Sjahriyar/c818b50a9e6bb25e1605504768552de2 to your computer and use it in GitHub Desktop.
Zsh configuration file, includes showing git branch name, case-insensitive completion, aliases, showing only the directory name on PS1, Python environment initialisation. Replace the USER_NAME and FAVORITE_PROJECT_DIR to your Mac username and your favourite project directory
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
# Created by Shahriyar Soheytizadeh | |
alias bl="cd .. && ls -al" | |
alias dump="~/class-dump" | |
alias FAVORITE_PROJECT_DIR="cd ~/Developer/FAVORITE_PROJECT_DIR" | |
alias py="python3" | |
# Load version control information | |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
# Format the vcs_info_msg_0_ variable | |
zstyle ':vcs_info:git:*' formats '(%b)' | |
# Set up the prompt (with git branch name) | |
setopt PROMPT_SUBST | |
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! | |
export PS1="%~ > " | |
export SDKMAN_DIR="/Users/USER_NAME/.sdkman" | |
PROMPT='%~ %F{cyan}${vcs_info_msg_0_}%f > ' | |
[[ -s "/Users/USER_NAME/.sdkman/bin/sdkman-init.sh" ]] && source "/Users/USER_NAME$ | |
# Allow for autocomplete to be case insensitive | |
zstyle ':completion:*' matcher-list '' \ | |
'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' \ | |
'+l:|?=** r:|?=**' | |
# Initialize the autocompletion for python virtual enviroment | |
# autoload -Uz compinit && compinit -i | |
# export WORKON_HOME=$HOME/.virtualenvs | |
# export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 | |
# export PROJECT_HOME=$HOME/Devel | |
# source /usr/local/bin/virtualenvwrapper.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment