xdg-wrappers/rg: set config path only on existing file

This commit is contained in:
crater2150 2023-01-25 10:11:02 +01:00
parent 697c7e105f
commit f8cb23ec53

View file

@ -1,4 +1,7 @@
#!/bin/zsh
source ${$(realpath "$0"):h:h}/lib/next-in-path.zsh
export RIPGREP_CONFIG_PATH=${XDG_CONFIG_HOME:-$HOME/.config}/ripgreprc
RIPGREP_CONFIG_PATH=${XDG_CONFIG_HOME:-$HOME/.config}/ripgreprc
if [[ -e $RIPGREP_CONFIG_PATH ]]; then
export RIPGREP_CONFIG_PATH
fi
$(next-in-path rg $0) $@