Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.39 KB | None | 0 0
  1. [popsul] ~  % cat .zshrc
  2. # Set up the prompt
  3.  
  4.  
  5. setopt prompt_subst
  6. autoload -Uz vcs_info
  7. zstyle ':vcs_info:*' stagedstr 'M'
  8. zstyle ':vcs_info:*' unstagedstr 'M'
  9. zstyle ':vcs_info:*' check-for-changes true
  10. zstyle ':vcs_info:*' actionformats '%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
  11. zstyle ':vcs_info:*' formats '%F{5}[%F{2}%b%F{5}] %F{2}%c%F{3}%u%f'
  12. zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
  13. zstyle ':vcs_info:hg*+set-message:*' hooks hg-untracked
  14. zstyle ':vcs_info:*' enable git hg
  15. +vi-git-untracked() {
  16.     if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \
  17.         [[ $(git ls-files --other --directory --exclude-standard | sed q | wc -l | tr -d ' ') == 1 ]] ; then
  18.         hook_com[unstaged]+='%F{1}??%f'
  19.     fi
  20. }
  21.  
  22. +vi-hg-untracked() {
  23.     hg sum &> /dev/null
  24.         if [[ $? == 0 ]] && \
  25.                 [[ $(hg st | grep '^?' | sed q | wc -l | tr -d ' ') == 1 ]] ; then
  26.                 hook_com[unstaged]+='%F{1}??%f'
  27.         fi
  28. }
  29.  
  30.  
  31. precmd () { vcs_info }
  32. PROMPT='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_} %f%# '
  33.  
  34. #autoload -Uz promptinit
  35. #promptinit
  36. #prompt adam1
  37.  
  38. setopt histignorealldups sharehistory
  39.  
  40. # Use emacs keybindings even if our EDITOR is set to vi
  41. bindkey -e
  42.  
  43. # Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
  44. HISTSIZE=1000
  45. SAVEHIST=1000
  46. HISTFILE=~/.zsh_history
  47.  
  48. # Use modern completion system
  49. autoload -Uz compinit
  50. compinit
  51.  
  52. zstyle ':completion:*' auto-description 'specify: %d'
  53. zstyle ':completion:*' completer _expand _complete _correct _approximate
  54. zstyle ':completion:*' format 'Completing %d'
  55. zstyle ':completion:*' group-name ''
  56. zstyle ':completion:*' menu select=2
  57. eval "$(dircolors -b)"
  58. zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
  59. zstyle ':completion:*' list-colors ''
  60. zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
  61. zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
  62. zstyle ':completion:*' menu select=long
  63. zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
  64. zstyle ':completion:*' use-compctl false
  65. zstyle ':completion:*' verbose true
  66.  
  67. zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
  68. zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
  69.  
  70. export JDK_HOME=/opt/jdk/
  71. export JAVA_HOME=/opt/jdk/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement