Locating system ackrc on a non-global installation (ack 2)

12 views
Skip to first unread message

Rob Hoelz

unread,
May 3, 2012, 5:06:35 PM5/3/12
to ack-...@googlegroups.com
Hello everyone,

As you may know, ack 2.0 searches for several different ackrc files (global, user, and project).  The global location defaults to '/etc/ackrc' on Unix-like systems.  However, sometimes you may be operating in an environment where you don't have write access to the /etc directory (ex. a shared hosting environment).  If this is the case, how should we look for ackrc?  Andy and I discussed this for a bit, and he said it might be acceptable to look in the same directory as the ack script (if you install it to ~/bin/, ack and ackrc would be under that directory).  Andy also thinks we should get the opinion of the community; so, what do you all think we should do?

-Rob

Nathan Arthur

unread,
May 3, 2012, 9:18:44 PM5/3/12
to ack-...@googlegroups.com
Does this problem really exist?  Specifically: are there cases where someone doesn't have access to /etc *and* they need a global (i.e. multi-user) ack config?  I'll bet it's pretty rare.

To answer your question, though, putting the file in the same dir as ack seems like a nice solution.  It might also be reasonable to just modify the script directly, although that would make upgrades annoying.

Nathan




-Rob

--
You received this message because you are subscribed to the Google Groups "ack dev/users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ack-users/-/5XhZYs3ojqIJ.
To post to this group, send email to ack-...@googlegroups.com.
To unsubscribe from this group, send email to ack-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ack-users?hl=en.

Elliot Shank

unread,
May 4, 2012, 7:49:44 AM5/4/12
to ack-...@googlegroups.com
On 5/3/12 4:06 PM, Rob Hoelz wrote:
> what do you all think we should do?

Use FindBin to look in ../etc/ackrc, i.e. if ack is ~/bin/ack, look for ~/etc/ackrc. (Actually, my ~/.ackrc is symlinked to ~/etc/ackrc, both for VCS purposes and that I just don't like all the dotfiles in ~.)
Reply all
Reply to author
Forward
0 new messages