config/zsh: improve startup options

This commit is contained in:
xeruf 2022-11-29 23:32:54 +01:00
parent 75a0bd7fa9
commit f026e295b5
2 changed files with 8 additions and 2 deletions

View File

@ -45,6 +45,8 @@ ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" # Cache completions
DISABLE_UPDATE_PROMPT=true DISABLE_UPDATE_PROMPT=true
ZSH_DISABLE_COMPFIX=true ZSH_DISABLE_COMPFIX=true
# For fresh systems
test -d "$ZSH" || source $HOME/.zshenv
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
## Functions ## Functions
@ -158,6 +160,7 @@ setopt hist_reduce_blanks
unsetopt hist_ignore_space unsetopt hist_ignore_space
# TODO filter from history: netkeeper killm # TODO filter from history: netkeeper killm
setopt sh_word_split
setopt extended_glob setopt extended_glob
unsetopt case_glob unsetopt case_glob
@ -196,7 +199,7 @@ source_existing $XDG_CONFIG_HOME/broot/launcher/bash/br
which zoxide >/dev/null && which zoxide >/dev/null &&
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
source_existing /home/janek/.nix-profile/etc/profile.d/nix.sh source_existing $HOME/.nix-profile/etc/profile.d/nix.sh
which direnv >/dev/null && eval "$(direnv hook zsh)" which direnv >/dev/null && eval "$(direnv hook zsh)"
true true

View File

@ -93,9 +93,12 @@ export EDITOR="$(
else echo $ALTERNATE_EDITOR else echo $ALTERNATE_EDITOR
fi fi
)" )"
export LS_OPTIONS='--color=auto --human-readable --si --group-directories-first --file-type --dereference-command-line'
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)" export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
# TODO put into config file and use --exclude-from # TODO put into config file and use --exclude-from
export DIRS_GENERATED="-x generated -x .gradle -x cmake_build -x dist-newstyle -x node_modules -x __pycache__ -x 'System Volume Information'" # -x 'System Volume Information'
export DIRS_GENERATED="-x generated -x .gradle -x cmake_build -x dist-newstyle -x node_modules -x __pycache__"
export DIRS_IGNORE_SAFE="-x .cache -x .cpan -x *Cache -x .pyenv -x .local/cache -x share/baloo -x share/cabal -x share/cargo -x share/digikam -x share/gem -x share/JetBrains -x share/tldr -x share/syncthing -x share/Steam/ubuntu* -x share/Steam/package -x share/virtualenv -x share/Zeal -x state/gradle -x state/android -x Ferdi/Partitions -x oh-my-zsh -x wine/drive_c/windows -x vendor/cache $DIRS_GENERATED" export DIRS_IGNORE_SAFE="-x .cache -x .cpan -x *Cache -x .pyenv -x .local/cache -x share/baloo -x share/cabal -x share/cargo -x share/digikam -x share/gem -x share/JetBrains -x share/tldr -x share/syncthing -x share/Steam/ubuntu* -x share/Steam/package -x share/virtualenv -x share/Zeal -x state/gradle -x state/android -x Ferdi/Partitions -x oh-my-zsh -x wine/drive_c/windows -x vendor/cache $DIRS_GENERATED"
export DIRS_IGNORE="-x .sync -x .stfolder -x *build -x .git -x .idea -x env -x out -x cache -x Partitions -x vendor/bundle -x log $DIRS_IGNORE_SAFE" export DIRS_IGNORE="-x .sync -x .stfolder -x *build -x .git -x .idea -x env -x out -x cache -x Partitions -x vendor/bundle -x log $DIRS_IGNORE_SAFE"
# red stderr # red stderr