From d4d71f426117ac90c7b3728d0cec2a34a7c0bd9b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 5 Jul 2013 13:28:46 +0900 Subject: [PATCH] update s function --- bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bashrc b/bashrc index 4119cae..6b891aa 100755 --- a/bashrc +++ b/bashrc @@ -374,6 +374,11 @@ s(){ ack --pager="$PAGER" "$@" else echo ">> Using grep" 1>&2 + if test $# -eq 0 + then + echo "No search word given." 1>&2 + return 1 + fi grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \ | $PAGER # echo "No search command found. Use grep." 2>&1