diff --git a/.config/ripgrep/ripgrepignore b/.config/ripgrep/ripgrepignore new file mode 100644 index 0000000..2e6776f --- /dev/null +++ b/.config/ripgrep/ripgrepignore @@ -0,0 +1 @@ +*.ts.snap diff --git a/.config/ripgrep/ripgreprc b/.config/ripgrep/ripgreprc new file mode 100644 index 0000000..e5eb862 --- /dev/null +++ b/.config/ripgrep/ripgreprc @@ -0,0 +1 @@ +--ignore-file=/home/pavel/.config/ripgrep/ripgrepignore diff --git a/.profile b/.profile index 3f8ed6e..cc3ff1d 100644 --- a/.profile +++ b/.profile @@ -1,11 +1,12 @@ # [[file:Console.org::*Environment][Environment:1]] -# export EDITOR=/usr/bin/vim -# export BROWSER=/usr/bin/firefox export QT_QPA_PLATFORMTHEME="qt5ct" export QT_AUTO_SCREEN_SCALE_FACTOR=0 -# export GTK2_RC_FILES="$HOME/.gtkrc-2.0" # Environment:1 ends here +# [[file:Console.org::*Environment][Environment:2]] +export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc +# Environment:2 ends here + # [[file:Console.org::*My paths][My paths:1]] if [ -d "$HOME/bin" ] ; then export PATH="$HOME/bin:$PATH" diff --git a/Console.org b/Console.org index 809f231..fbd6182 100644 --- a/Console.org +++ b/Console.org @@ -53,11 +53,13 @@ :END: ** Environment #+begin_src sh -# export EDITOR=/usr/bin/vim -# export BROWSER=/usr/bin/firefox export QT_QPA_PLATFORMTHEME="qt5ct" export QT_AUTO_SCREEN_SCALE_FACTOR=0 -# export GTK2_RC_FILES="$HOME/.gtkrc-2.0" +#+end_src + +Set ripgrep config path +#+begin_src sh +export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc #+end_src ** My paths My script folders @@ -843,6 +845,18 @@ key_bindings: | jmtpfs | A tool to mount MTP devices (e.g. Android) | | tokei | Count lines of code | +** ripgrep config +Occasionally I can't exclude certain files from ripgrep via the VCS settings, so here is a simple config to ignore certain files globally. +#+begin_src text :tangle ~/.config/ripgrep/ripgreprc +--ignore-file=/home/pavel/.config/ripgrep/ripgrepignore +#+end_src + +The corresponding ignore file: +#+begin_src text :tangle ~/.config/ripgrep/ripgrepignore +*.ts.snap +#+end_src + +By default ripgrep doesn't read any configs, so it is necessary to set the =RIPGREP_CONFIG_PATH= variable in the [[*Environment][.profile.]] * Misc scripts ** =nt= - exec command with a finished notification Usage: