config/shell: create shared IGNOREDIRS

This commit is contained in:
xeruf 2021-06-19 21:25:10 +02:00
parent bfcaeb7436
commit b7e02d8e2d
3 changed files with 8 additions and 2 deletions

View File

@ -192,7 +192,7 @@ alias jc='jcl -u'
alias jcj='jcl -o json-pretty -u' alias jcj='jcl -o json-pretty -u'
alias grp='grep --line-number --ignore-case --binary-files=without-match --directories=skip' alias grp='grep --line-number --ignore-case --binary-files=without-match --directories=skip'
alias grpr='grp --recursive --exclude-dir={.sync,.stfolder,.git,dev,\*build}' alias grpr="grp --recursive --exclude-dir={$IGNOREDIRS}"
# Recover stray swap files from neovim # Recover stray swap files from neovim
alias vrec="ls $XDG_DATA_HOME/nvim/swap | sed 's/\%/\//g' | sed 's|\(.*\)\..*|\1|' | head -1 | xargs -r nvim" alias vrec="ls $XDG_DATA_HOME/nvim/swap | sed 's/\%/\//g' | sed 's|\(.*\)\..*|\1|' | head -1 | xargs -r nvim"

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Use grep and sed to replace $1 with $2 recursively and print what is done # Use grep and sed to replace $1 with $2 recursively and print what is done
grep --null --recursive --files-with-matches \ grep --null --recursive --files-with-matches \
--binary-files=without-match --exclude-dir={.sync,.stfolder,.git} "$1" | --binary-files=without-match "--exclude-dir={$IGNOREDIRS}" "$1" |
xargs -0 sed -i "\|${1}|{ xargs -0 sed -i "\|${1}|{
s||${2}|g s||${2}|g
w /dev/stdout w /dev/stdout

View File

@ -15,6 +15,11 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
export RLWRAP_HOME="$XDG_CACHE_HOME"/rlwrap export RLWRAP_HOME="$XDG_CACHE_HOME"/rlwrap
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
export CABAL_DIR="$XDG_CACHE_HOME"/cabal export CABAL_DIR="$XDG_CACHE_HOME"/cabal
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
# Java & Android # Java & Android
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java" export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
@ -34,6 +39,7 @@ export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME"/ccache.config
export CCACHE_DIR="$XDG_CACHE_HOME"/ccache export CCACHE_DIR="$XDG_CACHE_HOME"/ccache
# environment # environment
export IGNOREDIRS=".sync,.stfolder,.git,out,build,dev"
export EDITOR=/usr/bin/nvim export EDITOR=/usr/bin/nvim
export MANPAGER="sh -c 'col -bx | bat -l man -p'" export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export LESS='--RAW-CONTROL-CHARS --ignore-case' export LESS='--RAW-CONTROL-CHARS --ignore-case'