zshrc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. source $HOME/.oh-my-zshrc
  2. HISTFILE=~/.histfile
  3. HISTSIZE=1000
  4. SAVEHIST=1000
  5. setopt incappendhistory nomatch correct NO_HUP
  6. unsetopt beep
  7. bindkey -v
  8. zstyle :compinstall filename '/home/drew/.zshrc'
  9. autoload -Uz compinit
  10. compinit
  11. autoload -U colors && colors
  12. # Have to reset color to cyan after the bold tags for some reason.
  13. PROMPT="%{$fg[cyan]%}[%n@%M %B%1~%b%{$fg[cyan]%}]%# %{$reset_color%}"
  14. alias ll='ls -alF'
  15. alias la='ls -A'
  16. alias l='ls -CF'
  17. alias ls='ls --color=auto'
  18. eval "$(hub alias -s)"
  19. # Allow ctrl+S in vim to save files, ie pass
  20. # the command to vim when vim is open.
  21. export EDITOR="nvim"
  22. alias vim="nvim"
  23. dot_sync() {
  24. current_branch=$(git branch | grep '\*.*' | cut -d '*' -f 2 | tr -d ' ')
  25. if [ -z "$1" ]; then
  26. 1=$current_branch
  27. fi
  28. for branch in $(git branch | grep '^[^*].*$'); do
  29. git ch $branch
  30. git cherry-pick $1 || { echo 'Problems.. manually cherry-pick'; return 0 }
  31. done
  32. git ch $current_branch
  33. }
  34. rmorig() {
  35. if [ "$1" = "-f" ]; then
  36. find . -name "*.orig" -print -delete
  37. else
  38. find . -name "*.orig" -print
  39. fi
  40. }
  41. # Set Home, End, Del, PgUp, PgDown keys to actually do something.
  42. bindkey '^[OH' beginning-of-line
  43. bindkey '^[OF' end-of-line
  44. bindkey '^[[3~' delete-char
  45. bindkey '^[[5~' beginning-of-buffer-or-history
  46. bindkey '^[[6~' end-of-buffer-or-history
  47. if [ -x /usr/bin/ssh-agent -a -z "$SSH_AUTH_SOCK" ]; then
  48. eval "$(keychain --eval -Q -q --agents ssh `find $HOME/.ssh/* ! -name '*.pub' ! -name 'config' ! -name 'known_hosts'`)"
  49. fi
  50. export PAGER=less
  51. export DOTFILES=$HOME/Documents/dotfiles
  52. export GOPATH=$HOME/Documents/go
  53. export PATH=$DOTFILES/bin:$PATH
  54. export PATH=$PATH:$HOME/.rvm/bin
  55. export PATH=$PATH:/opt/android-sdk/tools:/opt/android-sdk/platform-tools
  56. export PATH=$PATH:$GOPATH/bin
  57. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  58. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  59. source $HOME/.c.zsh