From 1726728f8990928a436906db09480b5a87537087 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Mon, 11 Mar 2013 00:19:12 -0500 Subject: [PATCH] bin/git-ack: ack-based replacement for "git grep ..." --- .gitconfig | 9 ++++++--- bin/git-ack | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 bin/git-ack diff --git a/.gitconfig b/.gitconfig index ca9fdf8..7ec21c9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -26,15 +26,18 @@ # Diff helpers df = diff --patience dfc = diff --patience --cached + # Searching + ls = ls-files + ack = !git-ack + # Submodules + sub = !git-subup + sup = !git-subup pull # Misc root = rev-parse --show-toplevel sh = !git-sh thanks = !git-thanks who = shortlog -s -- - sub = !git-subup - sup = !git-subup pull fp = format-patch --stdout - ls = ls-files [core] filemode = true diff --git a/bin/git-ack b/bin/git-ack new file mode 100755 index 0000000..c237ce0 --- /dev/null +++ b/bin/git-ack @@ -0,0 +1,6 @@ +#!/bin/sh +# Usage: git-ack PATTERN +# ack-based replacement for "git grep ...". Look for specified patterns in the +# tracked files in the work tree. + +git ls-files -z | xargs -0 ack $* -- 2.47.1