From dfb3eaa2f619e4e09f8227ce081af75e24d98aec Mon Sep 17 00:00:00 2001 From: "J. Brandt Buckley" Date: Wed, 20 Feb 2013 18:45:42 -0800 Subject: [PATCH] Use $ACKRC if set, otherwise use $HOME/.ackrc The $ACKRC environmental variable allows a user to specify a path to his or her Ack config file. If not set, Ack looks for a file in the default location (~/.ackrc). This update makes ack completion follow that same behavior. --- src/_ack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_ack b/src/_ack index d0523b3..2b1a0cf 100644 --- a/src/_ack +++ b/src/_ack @@ -166,7 +166,7 @@ _ack() { _ack_types_caching_policy() { # Rebuild if ackrc more recent than cache. - [[ -f $HOME/.ackrc && $$HOME/.ackrc -nt "$1" ]] && return 0 + [[ -f ${ACKRC:-$HOME/.ackrc} && ${ACKRC:-$HOME/.ackrc} -nt "$1" ]] && return 0 # Rebuild if cache is older than one week. local -a oldp