.zshrc (1701B)
1 autoload -U colors && colors 2 3 [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" 4 5 # fancy prompt 6 #PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " 7 8 PROMPT="%{$fg[green]%}%n@%m %{$fg[cyan]%}%~ %{$reset_color%}%# " 9 #PROMPT="%{$fg[cyan]%}%~ %{$fg[magenta]%}>>%{$reset_color%} " 10 11 HISTFILE=$HOME/.cache/zsh/history 12 HISTSIZE=10000 13 SAVEHIST=10000 14 15 setopt autocd 16 unsetopt beep 17 bindkey -v 18 export KEYTIMEOUT=1 19 20 # Basic auto/tab complete: 21 autoload -U compinit 22 zstyle ':completion:*' menu select 23 zmodload zsh/complist 24 compinit 25 _comp_options+=(globdots) 26 27 # Use vim keys in tab complete menu: 28 bindkey -M menuselect 'h' vi-backward-char 29 bindkey -M menuselect 'k' vi-up-line-or-history 30 bindkey -M menuselect 'l' vi-forward-char 31 bindkey -M menuselect 'j' vi-down-line-or-history 32 bindkey -v '^?' backward-delete-char 33 34 # edit cmd in vim 35 autoload edit-command-line; zle -N edit-command-line 36 bindkey '^e' edit-command-line 37 bindkey -M vicmd '^e' edit-command-line 38 39 # Change cursor shape for different vi modes. 40 # function zle-keymap-select () { 41 # case $KEYMAP in 42 # vicmd) echo -ne '\e[2 q';; # block 43 # viins|main) echo -ne '\e[6 q';; # beam 44 # esac 45 # } 46 #zle -N zle-keymap-select 47 #zle-line-init() { 48 # echo -ne "\e[6 q" 49 # } 50 # zle -N zle-line-init 51 # echo -ne '\e[6 q' # Use beam shape cursor on startup. 52 # preexec() { echo -ne '\e[6 q' ;} # Use beam shape cursor for each new prompt. 53 54 # Load syntax highlighting; should be last. 55 # source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh 2> /dev/null 56 57 [ -x /bin/fish ] && SHELL=/bin/fish exec fish