Last active
July 14, 2023 11:52
-
-
Save robpataki/ce8a6e4b80c9dd43eef44fc1999a2102 to your computer and use it in GitHub Desktop.
.zshrc
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
# Load SSH keys | |
ssh-add --apple-use-keychain ~/.ssh/id_rsa | |
ssh-add --apple-use-keychain ~/.ssh/bb_rsa | |
ssh-add --apple-use-keychain ~/.ssh/gh-per_rsa | |
ssh-add --apple-use-keychain ~/.ssh/gitlab_rsa | |
# Turn on Git completion | |
autoload -Uz compinit && compinit | |
# Git aware prompt | |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
zstyle ':vcs_info:git:*' formats 'on %F{011}↱ %b%f' | |
setopt PROMPT_SUBST | |
PROMPT='%n in ${PWD/#$HOME/~} ${vcs_info_msg_0_}: ' | |
# Git shortcuts | |
alias gst="git status" | |
alias gfp="git fetch -p" | |
alias gpom="git push origin master" | |
alias gpod="git push origin develop" | |
alias gifpod="gfp && git pull origin develop" | |
alias greset="git reset --hard HEAD" | |
alias gprom="git pull --rebase origin master" | |
alias gprod="git pull --rebase origin develop" | |
alias glog="git log --graph --all --pretty=format:'%C(yellow)%h -%C(auto)%d %C(bold cyan)%s %C(bold white)(%cr)%Creset %C(dim white)<%an>'" | |
# Shortcuts | |
alias la='ls -la' | |
# alias python='python3' | |
alias code=\"/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code\" | |
# NVM | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm | |
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion | |
# Open Terminal in specific folder | |
# cd ~/Work/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment