]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/commit
bin/ack-wrapper: Correctly escape user-supplied args
authorTony Duckles <tony@nynim.org>
Fri, 8 Mar 2013 23:36:18 +0000 (17:36 -0600)
committerTony Duckles <tony@nynim.org>
Fri, 8 Mar 2013 23:36:18 +0000 (17:36 -0600)
commit84f175620774011e55634d24dd39834eb31d394a
tree362bac1e28ceada7d46b251866e86b2147c54760
parente9168a17de6326b1571bda3b621aee7533d7a2bd
bin/ack-wrapper: Correctly escape user-supplied args

When using "ack needle foo*.txt", the shell will expand that
wildcard and if any of the matching files contain spaces (or other
special chars that need escaping) those won't be passed correctly
to 'ack' when using the old-style "command ack $ackrc $*" calling
method. We need to single-quote wrap any arguments to ensure we
don't need to escape-out any spaces/exclamation/question chars.
bin/ack-wrapper