From eb5e0276017b2d54b6444f4a6d85431fda97f38f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 3 Jun 2013 21:02:17 +0900 Subject: [PATCH] update function s --- bashrc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bashrc b/bashrc index 5fa705f..437ca8a 100755 --- a/bashrc +++ b/bashrc @@ -315,16 +315,17 @@ s(){ if git rev-parse --git-dir >/dev/null 2>&1 then - git grep -n "$1" + git grep -n "$@" elif which ag >/dev/null then - ag --pager="$PAGER" "$1" + ag --pager="$PAGER" "$@" elif which ack >/dev/null then - ack --pager="$PAGER" "$1" + ack --pager="$PAGER" "$@" else - echo "No search command found. Use grep." 2>&1 - return 127 + grep -nH --exclude='.svn/*' --exclude='.git/*' "$@" -r . | $PAGER + # echo "No search command found. Use grep." 2>&1 + # return 127 fi }