beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

XDG Base Directory Specification #516

Closed sullyj3 closed 7 years ago

sullyj3 commented 9 years ago

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.

petdance commented 9 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.

ZuBB commented 9 years ago

Is priority of per-project .ackrc higher than value of ACKRC environment variable?

hoelzro commented 9 years ago

I believe ACKRC takes precedence

hoelzro commented 9 years ago

nope, I'm wrong; ACKRC overrides the location for your user ackrc, so it comes after the project ackrc.

ZuBB commented 9 years ago

Is there any chance that you will change that behaviour?

petdance commented 9 years ago

Probably not. It's been the way it is for years.

ZuBB commented 9 years ago

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

hoelzro commented 9 years ago

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.

petdance commented 7 years ago

Closing.