You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.2 KiB

3 years ago
3 years ago
3 years ago
  1. # Set up the prompt
  2. autoload -Uz promptinit
  3. promptinit
  4. # prompt adam1
  5. # prompt bart
  6. setopt histignorealldups sharehistory
  7. # Use emacs keybindings even if our EDITOR is set to vi
  8. # bindkey -e
  9. # Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
  10. HISTSIZE=1000
  11. SAVEHIST=1000
  12. HISTFILE=~/.zsh_history
  13. # Use modern completion system
  14. autoload -Uz compinit
  15. compinit
  16. zstyle ':completion:*' auto-description 'specify: %d'
  17. zstyle ':completion:*' completer _expand _complete _correct _approximate
  18. zstyle ':completion:*' format 'Completing %d'
  19. zstyle ':completion:*' group-name ''
  20. zstyle ':completion:*' menu select=2
  21. eval "$(dircolors -b)"
  22. zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
  23. zstyle ':completion:*' list-colors ''
  24. zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
  25. zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
  26. zstyle ':completion:*' menu select=long
  27. zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
  28. zstyle ':completion:*' use-compctl false
  29. zstyle ':completion:*' verbose true
  30. zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
  31. zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
  32. source ~/.sh_alias
  33. # to see the available colours: for COLOR in {1..255}; do echo -en "\e[38;5;${COLOR}m${COLOR} "; done; echo;
  34. PROMPT='%B%F{48}%n%F{white}:%F{39}%0~%f%b$ '
  35. # git
  36. autoload -Uz vcs_info
  37. precmd_vcs_info() { vcs_info }
  38. precmd_functions+=( precmd_vcs_info )
  39. setopt prompt_subst
  40. RPROMPT=\$vcs_info_msg_0_%F{244}%*%f
  41. zstyle ':vcs_info:git:*' formats '%F{207}(%b)%f'
  42. zstyle ':vcs_info:*' enable git
  43. # go
  44. export PATH=$PATH:/usr/local/go/bin
  45. export PATH=$PATH:~/go/bin
  46. export GOPATH=$HOME/go
  47. alias goimports="~/go/bin/goimports"
  48. alias golint="~/go/bin/golint"
  49. # alias benchcmp="~/go/bin/benchcmp"
  50. # export GOPHERJS_GOROOT="$(go1.12.16 env GOROOT)"
  51. # rust
  52. export PATH="$HOME/.cargo/bin:$PATH"
  53. export EDITOR=vim
  54. export LC_ALL="en_US.UTF-8"
  55. # fzf
  56. [ -f ~/.fzf.zsh ]
  57. if [ -n "${commands[fzf-share]}" ]; then
  58. source "$(fzf-share)/key-bindings.zsh"
  59. source "$(fzf-share)/completion.zsh"
  60. fi