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