Skip to content

why doesn't setting RIPGREP_CONFIG_PATH cause ripgrep to use my config file? #2890

Answered by BurntSushi
minusfive asked this question in Q&A
Discussion options

You must be logged in to vote

Can you show the full --debug output?

My guess is that you aren't setting the environment variable correctly. This varies depending on your shell environment. The ripgrep docs assume you know how to set environment variables in a way that is carried to subprocesses executed from your shell. For example:

$ env | rg FOOBAR
$ echo $FOOBAR

$ FOOBAR=1
$ env | rg FOOBAR
$
$ echo $FOOBAR
1

Notice how env doesn't show FOOBAR as defined even though echo $FOOBAR does work. In order to make environment variables visible to subprocesses in a standard Unix shell, you need to export them:

$ export FOOBAR=1
$ env | rg FOOBAR
FOOBAR=1
$ echo $FOOBAR
1

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@minusfive
Comment options

Answer selected by minusfive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants