mirror of
https://github.com/divnix/digga.git
synced 2024-12-18 13:41:33 +03:00
70 lines
1.4 KiB
Bash
70 lines
1.4 KiB
Bash
# tilde directories
|
|
hash -d \
|
|
nixos=/etc/nixos \
|
|
dl=~/Downloads \
|
|
git=~/git
|
|
|
|
hash -d \
|
|
github=~git/github.com \
|
|
gitlab=~git/gitlab.com
|
|
|
|
# Zsh options
|
|
setopt extendedglob
|
|
setopt incappendhistory
|
|
setopt sharehistory
|
|
setopt histignoredups
|
|
setopt histreduceblanks
|
|
setopt histignorespace
|
|
setopt histallowclobber
|
|
setopt autocd
|
|
setopt cdablevars
|
|
setopt nomultios
|
|
setopt pushdignoredups
|
|
setopt autocontinue
|
|
setopt promptsubst
|
|
|
|
# Environment
|
|
HISTSIZE=10000
|
|
SAVEHIST=10000
|
|
HISTFILE=$HOME/.history
|
|
DIRSTACKSIZE=5
|
|
|
|
# key binds
|
|
bindkey -v '^?' backward-delete-char
|
|
bindkey '^[OA' history-substring-search-up
|
|
bindkey '^[OB' history-substring-search-down
|
|
bindkey -M vicmd 'k' history-substring-search-up
|
|
bindkey -M vicmd 'j' history-substring-search-down
|
|
|
|
# if in tmux launch skim in tmux pane
|
|
[[ ${+TMUX} == 1 ]] \
|
|
&& SKIM_TMUX=1
|
|
|
|
#load compinit
|
|
autoload -Uz compinit
|
|
|
|
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump \
|
|
|| stat -f '%Sm' -t '%j' ~/.zcompdump)
|
|
|
|
# save time if completion cache has been update recently
|
|
if [ $(date +'%j') != $updated_at ]; then
|
|
compinit
|
|
else
|
|
compinit -C
|
|
fi
|
|
|
|
# Case insens only when no case match; after all completions loaded
|
|
zstyle ':completion:*' matcher-list \
|
|
"" 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
|
|
|
# Auto rehash for new binaries
|
|
zstyle ':completion:*' rehash true
|
|
|
|
|
|
# remove duplicates from paths
|
|
typeset -U path
|
|
typeset -U fpath
|
|
|
|
# keep shell state frozen
|
|
ttyctl -f
|