export PATH=/home/emerson/.local/bin:/usr/local/sbin:$PATH export ZSH=$HOME/.oh-my-zsh ZSH_THEME="" function prompt_char { if [ $UID -eq 0 ]; then echo "#"; else echo $; fi } DISABLE_UNTRACKED_FILES_DIRTY="true" plugins=(git) source $ZSH/oh-my-zsh.sh export LANG=en_US.UTF-8 export EDITOR='vim' PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%})(%m)%{%F{24}%} %(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} ' ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_SUFFIX=") " zle_highlight=( default:fg=default ) parent() { [[ ${1[1,$#2]} == $2 ]] } sibling() { [[ ${1:a:h} == ${2:a:h} ]] } function chpwd() { emulate -L zsh # Automatically fetch remotes and display Git status information when entering a repository. if [[ -d .git ]]; then git status fi } alias git='noglob git' alias ga='git add' alias gaa='git add .' alias gb='git branch' alias gc='git commit' alias gch='git checkout' alias gcl='git clone' alias gd='git diff' alias gdc='git diff HEAD~1' alias gds='git diff --staged' alias gf='git fetch' alias gp='git push' alias gpu='git pull' alias grb='git rebase' alias grbc='git rebase --continue' alias grh='git reset --hard' alias gs='git status' alias wtf='git wtf' alias gbranch='git name-rev --name-only HEAD' alias gcurrent='git log -1 --oneline' alias gfiles='git ls-tree --name-only -r $(git name-rev --name-only HEAD)' alias gours='git ls-files --unmerged | cut -f2 | uniq | xargs git checkout --ours' alias gstage='git diff-index --cached --name-only HEAD' alias gtheirs='git ls-files --unmerged | cut -f2 | uniq | xargs git checkout --theirs' alias gtree='git log --graph --all --pretty=format:"%Cred%h%Creset - %Cgreen(%cd - %cr)%Creset %s%C(yellow)%d %an%Creset" --abbrev-commit --date=iso' alias gauthors="git log --format='%aN <%aE>' | sort -u | egrep -v '\+ed'" alias getunicode="perl -C7 -ne 'for(split(//)){print sprintf(\"U\+\%04X\", ord).\" \".\$_.\"\n\"}'" alias mkenv="python3.7 -m venv .env && source .env/bin/activate" alias senv="source .env/bin/activate" if [ -z "$SSH_AUTH_SOCK" ] then # Check for a currently running instance of the agent RUNNING_AGENT="`ps -x | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`" if [ "$RUNNING_AGENT" = "0" ] then # Launch a new instance of the agent ssh-agent -s &> ~/.ssh/ssh-agent fi eval `cat ~/.ssh/ssh-agent` fi prompt_context() {}