Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should I put the ack configuration file on Windows?

Tags:

windows

perl

ack

I'm using ack (the grep replacement) on Windows XP under Strawberry Perl. Where should the .ackrc config file be placed, since ~/.ackrc is not reasonable on Windows?

like image 264
Jeremy Dunck Avatar asked Dec 06 '22 04:12

Jeremy Dunck


2 Answers

For windows (MSWin32, anyway), ack looks in the following places and uses the first file found:

$ENV{ACKRC}
$ENV{HOME}/.ackrc
$ENV{HOME}/_ackrc
$ENV{USERPROFILE}/.ackrc
$ENV{USERPROFILE}/_ackrc

All but the first are subject to glob-expansion, so watch out for meta-characters in your environment variables.

When not on windows, HOME and USERPROFILE are replaced by ~ and HOME, respectively.

like image 105
ysth Avatar answered Dec 17 '22 16:12

ysth


ack looks for either .ackrc or _ackrc under %HOME% or %USERPROFILE%.

like image 20
jamessan Avatar answered Dec 17 '22 17:12

jamessan