Pārlūkot izejas kodu

Merge branch 'master' of github.com:10sr/dotfiles

pull/1/head
10sr pirms 11 gadiem
vecāks
revīzija
ef6af3fa28
1 mainītis faili ar 7 papildinājumiem un 12 dzēšanām
  1. +7
    -12
      bashrc

+ 7
- 12
bashrc Parādīt failu

@@ -354,26 +354,23 @@ clk(){
}

s(){
# if test $# -eq 0
# then
# echo "No search word given." 1>&2
# return 1
# fi

if git rev-parse --git-dir >/dev/null 2>&1
then
echo ">> Using git-grep" 1>&2
echo ">> git grep -n $@" 1>&2
git grep -n "$@"
elif which ag >/dev/null 2>&1
then
echo ">> Using ag" 1>&2
echo ">> ag --pager=\"$PAGER\" $@" 1>&2
ag --pager="$PAGER" "$@"
elif which ack >/dev/null 2>&1
then
echo ">> Using ack" 1>&2
echo ">> ack --pager=\"$PAGER\" $@" 1>&2
ack --pager="$PAGER" "$@"
else
echo ">> Using grep" 1>&2
echo \
">> grep -nH --color=always" \
"--exclude=\'.svn/\*\' --exclude=\'.git/\*\'" \
"$@" "-r ." 1>&2
if test $# -eq 0
then
echo "No search word given." 1>&2
@@ -381,8 +378,6 @@ s(){
fi
grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \
| $PAGER
# echo "No search command found. Use grep." 2>&1
# return 127
fi
}



Notiek ielāde…
Atcelt
Saglabāt