]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/commit
bin/ack-wrapper: Handle STDIN being a pipe
authorTony Duckles <tony@nynim.org>
Sun, 10 Mar 2013 15:49:38 +0000 (10:49 -0500)
committerTony Duckles <tony@nynim.org>
Sun, 10 Mar 2013 15:57:52 +0000 (10:57 -0500)
commit32372c96ceefdb2ab057dad82a4e91b22ddc711b
tree5aac76468cbc2918526a58b410d7cef361302b19
parent76670706da02c235c691797928fd7a1bccd5e534
bin/ack-wrapper: Handle STDIN being a pipe

* If STDIN is a pipe ("test ! -t 0") use `cat` to redirect stdin to
  stdout and pipe the result to real-ack.
* Switch back to using "command ack" rather than "$(type -P ack").
  `type -P` is bash-centric. Try to be /bin/sh compatible.
* Use clear "${VAR}" syntax around all variables, for consistency.
bin/ack-wrapper