Guest User

Untitled

a guest
Feb 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. HISTFILE=$HOME/.zsh_history
  2. HISTSIZE=5000
  3. SAVEHIST=10000 # useful for setopt append_history
  4.  
  5. export EDITOR='vim'
  6. export PAGER='most'
  7. export SHELL='/bin/zsh'
  8.  
  9. PATH=./bin:$HOME/bin:$PATH:/usr/sbin:/opt/kde/bin:/opt/openoffice/program
  10. BC_ENV_ARGS="-q -l /home/rando/.bc/extensions.bc"
  11.  
  12. export MPD_HOST="localhost"
  13. export MPD_PORT=6600
  14. export IRBRC="$HOME/.irbrc"
  15. #gentoo portage completion
  16. autoload -U compinit promptinit
  17. compinit
  18. promptinit
  19.  
  20. # cache completions
  21. zstyle ':completion::complete:*' use-cache 1
  22.  
  23. # autocd
  24. setopt autocd
  25. cdpath=( ~/dev ~/ )
  26.  
  27. eval $(dircolors -b ~/.dircolors)
  28.  
  29. alias ls='ls -l -F -1 --color=auto --group-directories-first'
  30. alias ll='ls -al'
  31.  
  32. alias grep='egrep --color=tty'
  33.  
  34. alias dev='cd ~/dev'
  35. alias core='cd ~/dev/core/web'
  36. alias alarm='cd ~/dev/alarm/web'
  37.  
  38. alias rubyee='/opt/ruby-enterprise/bin/ruby'
  39. alias gemee='/opt/ruby-enterprise/bin/gem'
  40. alias rakeee='/opt/ruby-enterprise/bin/rake'
  41. alias merbee='/opt/ruby-enterprise/bin/ruby ./bin/merb -a thin'
  42. alias gems='cd /usr/lib/ruby/gems/1.8/gems'
  43.  
  44. alias ..='cd ..'
  45. alias ...='cd ../..'
  46. alias ....='cd ../../..'
  47.  
  48. alias f="find . ! -wholename '*.git*' -and ! -wholename '*.svn*' | xargs grep -i -n --colour=auto -E "
  49. alias F="find . ! -wholename '*.git*' -and ! -wholename '*.svn*' | xargs grep -n --colour=auto -E "
  50. alias fn="find . ! -wholename '*.git' -and ! -wholename '*.svn*' -iname "
  51.  
  52. alias cj="curl-json.sh "
  53.  
  54. alias d='dirs -v'
  55. alias e=$EDITOR
  56. alias h=history
  57. alias j=jobs
  58. alias po=popd
  59. alias pu=pushd
  60.  
  61. alias m=most
  62. alias c=cat
  63. alias l=less
  64. alias h=head
  65. alias t='tail -F'
  66.  
  67. # Arch
  68. alias p="sudo pacman-color"
  69. alias y="yaourt --aur"
  70.  
  71. # git
  72. alias gc='git commit'
  73. alias gst='git status'
  74. alias gco='git checkout'
  75. alias gp='git pull'
  76. alias gpu='git push'
  77. alias gaa='git add .'
  78. alias gb='git branch'
  79.  
  80. #global alias: does not need to be at beginning of a line
  81. alias -g M='|more'
  82. alias -g L='|less'
  83. alias -g H='|head'
  84. alias -g T='|tail'
  85.  
  86. alias -g SSCJ='application/vnd.absperf.sscj1+json'
  87. alias -g SSMJ='application/vnd.absperf.ssmj1+json'
  88. alias -g SSJ='application/vnd.absolute-performance.sysshep+json'
  89.  
  90. autoload -U compinit
  91. autoload history-search-end
  92. bindkey ' ' magic-space # also do history expansion on space
  93. bindkey '\ei' menu-complete # menu completion via esc-i
  94.  
  95. # Make home/end work
  96. bindkey "^[[1~" beginning-of-line
  97. bindkey "^[[4~" end-of-line
  98.  
  99. umask 022
  100.  
  101. bindkey -e #vi mode
  102.  
  103. setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!)
  104. #setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
  105. setopt extended_history # save each command's beginning timestamp and the duration to the history file
  106. setopt histignorespace # remove command lines from the history list when
  107. setopt correct # try to correct the spelling if possible
  108. setopt extended_glob # in order to use #, ~ and ^ for filename generation
  109. # grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) ->
  110. # -> searches for word not in compressed files
  111. # don't forget to quote '^', '~' and '#'!
  112. setopt notify # report the status of backgrounds jobs immediately
  113. setopt hash_list_all # Whenever a command completion is attempted, make sure \
  114. # the entire command path is hashed first.
  115. setopt completeinword # not just at the end
  116. setopt auto_pushd # make cd push the old directory onto the directory stack.
  117. setopt nonomatch # try to avoid the 'zsh: no matches found...'
  118. setopt nobeep # avoid "beep"ing
  119.  
  120.  
  121. # rebind up/down to search history
  122. bindkey '\e[A' history-search-backward
  123. bindkey '\e[B' history-search-forward
  124.  
  125. # preemtive auto-completion
  126. autoload predict-on
  127. zle -N predict-on
  128. zle -N predict-off
  129. bindkey '^Z' predict-on
  130. bindkey '^X^Z' predict-off
  131. zstyle ':predict' toggle true
  132. zstyle ':predict' verbose true
  133.  
  134. local blue_op="%{$fg[blue]%}[%{$reset_color%}"
  135. local blue_cp="%{$fg[blue]%}]%{$reset_color%}"
  136. local path_p="${blue_op}%~${blue_cp}"
  137. local user_host="${blue_op}%n@%m${blue_cp}"
  138. local ret_status="${blue_op}%?${blue_cp}"
  139. local hist_no="${blue_op}%h${blue_cp}"
  140. PROMPT="${path_p}${user_host}
  141. %# "
  142. local cur_cmd="${blue_op}%_${blue_cp}"
  143. PROMPT2="${cur_cmd}> "
Add Comment
Please, Sign In to add comment