Where Does ack Read Config Files?
ack code search rc lookup across global, user, project and flag paths.
Last updated
ack layers six config sources from defaults to CLI. Global, user, project and explicit files each play a role. Later layers override earlier ones predictably.
Home supports two spellings with an env redirect. Projects match either rc name walking upward. That layering keeps personal and repo rules separate.
Where ack stores this, by platform
~/.ackrc
Global plus home spellings with env redirect. Project files walking upward. Explicit flag and noenv for one-offs. Layer order runs defaults to CLI.
~/.ackrc
Same global, home and project layering with POSIX paths.
%AppData%\ackrc
Global under ProgramData with Roaming user twin. Same project and flag layering.
Frequently asked questions
Which rc file should I edit?
Match the layer to the need: user file for personal defaults, project file for repo rules, explicit flag for one-offs. Later layers win in order. Disable with the noenv flag when debugging.
Where are Windows rc files?
Windows keeps the global file under ProgramData with a per-user Roaming twin. Home and underscore spellings both load. An env var redirects the user layer anywhere.
Notice an outdated path? Let us know.