Closed sullyj3 closed 7 years ago
I don't know what XDG is, but you can have a per-project .ackrc in the root of the project, and you can also specify the location of your ackrc with the ACKRC environment variable.
Is priority of per-project .ackrc higher than value of ACKRC environment variable?
I believe ACKRC takes precedence
nope, I'm wrong; ACKRC overrides the location for your user ackrc, so it comes after the project ackrc.
Is there any chance that you will change that behaviour?
Probably not. It's been the way it is for years.
Ok, let me give an example
we set git opts globally (per user) in ~/.gitconfig
. However we can overwrite some opts for a particular project via $PROJECT_HOME/.git/config
.
git searches its config in home dir. if nothing found, he also looks into $HOME/.config/git/
(standart by X.org for all settings/rc files, ie XDG).
With help of ACKRC we are able to have "global" .ackrc in .config
. but in that case it not possible override some things at project level
I thought that ACKRC just replaces the user ackrc; it doesn't stop ack from looking for project ackrcs. So you can set ACKRC=$HOME/.config/ackrc
and still retain your ability to make project-specific overrides.
Closing.
Is there any chance of xdg support for ackrc? I'd much prefer the config file under ~/.config/ack/config or ~/.config/ackrc than cluttering up my home directory.