Skip to content

Instantly share code, notes, and snippets.

@cakoose
Last active February 6, 2020 00:57
Show Gist options
  • Save cakoose/4fb912f15b940d88953f62f5b09c1711 to your computer and use it in GitHub Desktop.
Save cakoose/4fb912f15b940d88953f62f5b09c1711 to your computer and use it in GitHub Desktop.
setopt histignoredups
setopt ignore_eof # Don't quit shell on Ctrl-D
# Tell Terminal.app whenever folder changes.
# This allows Terminal.app to open new tabs in the same folder as the current tab.
if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]] {
function chpwd {
local SEARCH=' '
local REPLACE='%20'
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
printf '\e]7;%s\a' "$PWD_URL"
}
chpwd
}
# Prompt
source "/usr/local/etc/bash_completion.d/git-prompt.sh"
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
precmd() { __git_ps1 $'\e[0;32m%n@%m\e[0m:\e[0;34m%~\e[0m' $'\n\$ ' ' [%s]' }
# Command completion
autoload -Uz compinit && compinit
autoload -Uz bashcompinit && bashcompinit
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
zstyle ':completion:*' menu select
fpath=(~/.zsh $fpath)
setopt noautomenu
setopt nomenucomplete
source /usr/local/bin/arcanist/resources/shell/bash-completion
# PATH
PATH="$HOME/.nodenv/bin:$PATH"
PATH="/usr/local/mysql/bin:$PATH"
PATH="$HOME/bin:$PATH"
PATH="$HOME/.cargo/bin:$PATH"
PATH="/usr/local/bin/arcanist/bin:$PATH"
eval "$(pyenv init -)"
eval "$(nodenv init -)"
eval "$(rbenv init -)"
nodenv global 12.14.1
export EDITOR=vim
export VISUAL=vim
export PAGER=less
# Aliases
u() { cd .. }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment