From f026e295b5fb4976fd835e7890ca18dbd8469820 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 29 Nov 2022 23:32:54 +0100 Subject: [PATCH] config/zsh: improve startup options --- .config/zsh/.zshrc | 5 ++++- .zshenv | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index ee58746..f2c3b50 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -45,6 +45,8 @@ ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" # Cache completions DISABLE_UPDATE_PROMPT=true ZSH_DISABLE_COMPFIX=true +# For fresh systems +test -d "$ZSH" || source $HOME/.zshenv source $ZSH/oh-my-zsh.sh ## Functions @@ -158,6 +160,7 @@ setopt hist_reduce_blanks unsetopt hist_ignore_space # TODO filter from history: netkeeper killm +setopt sh_word_split setopt extended_glob unsetopt case_glob @@ -196,7 +199,7 @@ source_existing $XDG_CONFIG_HOME/broot/launcher/bash/br which zoxide >/dev/null && 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)" true diff --git a/.zshenv b/.zshenv index 864aec2..cb8b6b7 100644 --- a/.zshenv +++ b/.zshenv @@ -93,9 +93,12 @@ export EDITOR="$( else echo $ALTERNATE_EDITOR 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)" # 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="-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