Browse Source

update s function

pull/1/head
10sr 11 years ago
parent
commit
d4d71f4261
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      bashrc

+ 5
- 0
bashrc View File

@@ -374,6 +374,11 @@ s(){
ack --pager="$PAGER" "$@" ack --pager="$PAGER" "$@"
else else
echo ">> Using grep" 1>&2 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 . \ grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \
| $PAGER | $PAGER
# echo "No search command found. Use grep." 2>&1 # echo "No search command found. Use grep." 2>&1


Loading…
Cancel
Save