zshrc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. source $HOME/.oh-my-zshrc
  2. HISTFILE=~/.histfile
  3. HISTSIZE=1000000
  4. SAVEHIST=1000000
  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. export PATH=$PATH:$HOME/.cargo/bin
  58. export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
  59. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  60. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  61. source $HOME/.c.zsh
  62. source $HOME/.2fak.zsh
  63. alias yaourt=pikaur
  64. alias pacaur=pikaur
  65. alias ack=rg
  66. # added by travis gem
  67. [ -f /home/drew/.travis/travis.sh ] && source /home/drew/.travis/travis.sh
  68. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  69. plugins=(
  70. aws
  71. bundler
  72. cargo
  73. docker
  74. docker-compose
  75. git
  76. npm
  77. npx
  78. rails
  79. rake
  80. ruby
  81. rust
  82. rvm
  83. yarn
  84. yarn
  85. )