]>
Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/ack-wrapper
2 # Wrapper around 'ack' to crawl all directories from $PWD to / (or $HOME)
3 # looking for a "local" .ackrc file. Useful for setting project-level
4 # --ignore-dir settings.
13 while [ "$dir" != "/" -a "$match" = "" ]; do
14 if [ -e "$dir/.ackrc" ]; then
15 if [ "$dir" != "$HOME" ]; then
17 echo "(Include: ${dir}/.ackrc)"
18 ackrc
=$(egrep "^[^#]" "${dir}/.ackrc" | tr '\n' ' ')
27 # Add quote-wrapping for any additional args to ensure proper passing to
29 for arg
in "$@"; do ackrc
="${ackrc} '${arg}'"; done
31 # Run the final command
32 eval "${ack} ${ackrc}"