ag+ becomes search

This commit is contained in:
Ev Bogdanov 2017-08-16 19:38:33 +03:00
parent c556b9d1ee
commit 1811d3351c
2 changed files with 5 additions and 1 deletions

16
bin/search Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
if [ ! "$(which ag)" ]; then
echo '+----------------------------------------------------+'
echo '| The Silver Searcher is not found. Go get it tiger! |'
echo '| |'
echo '| https://github.com/ggreer/the_silver_searcher |'
echo '+----------------------------------------------------+'
exit 1
fi
ag --nocolor --noheading "$@"
if [ $? -ne 0 ]; then
echo 'No results.'
fi