config/shell: create shared IGNOREDIRS
This commit is contained in:
parent
bfcaeb7436
commit
b7e02d8e2d
|
@ -192,7 +192,7 @@ alias jc='jcl -u'
|
|||
alias jcj='jcl -o json-pretty -u'
|
||||
|
||||
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
|
||||
alias vrec="ls $XDG_DATA_HOME/nvim/swap | sed 's/\%/\//g' | sed 's|\(.*\)\..*|\1|' | head -1 | xargs -r nvim"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Use grep and sed to replace $1 with $2 recursively and print what is done
|
||||
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}|{
|
||||
s||${2}|g
|
||||
w /dev/stdout
|
||||
|
|
|
@ -15,6 +15,11 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
|||
export RLWRAP_HOME="$XDG_CACHE_HOME"/rlwrap
|
||||
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
|
||||
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
|
||||
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
|
||||
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
|
||||
|
||||
# environment
|
||||
export IGNOREDIRS=".sync,.stfolder,.git,out,build,dev"
|
||||
export EDITOR=/usr/bin/nvim
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
export LESS='--RAW-CONTROL-CHARS --ignore-case'
|
||||
|
|
Loading…
Reference in New Issue