Last active
September 22, 2023 05:13
-
-
Save chuck0523/5caec6f0545089e90c049f74a92319d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
plugins=(git) | |
alias st="git status" | |
alias br="git branch" | |
alias gl="git log" | |
alias ad="git add ." | |
alias cm="git commit -m " | |
alias cb="git checkout -b " | |
alias ov="git ov" | |
alias ov="git commit --amend --no-edit" | |
alias push="git push origin HEAD" # HEAD is current branch | |
alias pf="push -f" | |
alias ud="git fetch --all --prune && git pull origin develop" # ud: update local develop branch after fetching origin branchs | |
alias fetch="git fetch --all --prune" | |
alias sz="source ~/.zshrc" # sz: source zshrc | |
alias rm="git branch -D `git branch --merged | grep -v \* | xargs`" # remove all local branches | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
# tabtab source for packages | |
# uninstall by removing these lines | |
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true | |
export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
# SSH cert setting | |
# ssh-add --apple-use-keychain ~/.ssh/id_rsa | |
# zsh-completions | |
if type brew &>/dev/null; then | |
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH | |
# zsh-autosuggestions | |
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh | |
autoload -Uz compinit && compinit | |
fi | |
# Macのターミナル画面にGitブランチ名を表示させるようにする(https://bottoms-programming.com/archives/termina-git-branch-name-zsh.html | |
autoload -Uz vcs_info | |
setopt prompt_subst | |
zstyle ':vcs_info:git:*' check-for-changes true | |
zstyle ':vcs_info:git:*' stagedstr "%F{magenta}!" | |
zstyle ':vcs_info:git:*' unstagedstr "%F{yellow}+" | |
zstyle ':vcs_info:*' formats "%F{cyan}%c%u[%b]%f" | |
zstyle ':vcs_info:*' actionformats '[%b|%a]' | |
precmd () { vcs_info } | |
PROMPT=' | |
[%F{green}%~%f]%F{cyan}$vcs_info_msg_0_%f | |
%F{yellow}$%f ' | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/Users/chuck/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/chuck/google-cloud-sdk/path.zsh.inc'; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment