Fix notegrep output bug

This commit is contained in:
dmarakom6 2021-06-27 14:25:58 +03:00
parent 7873536b92
commit 56eb26ce57

View file

@ -170,26 +170,24 @@ function notegrep() {
. ~/.shellnotes/util/notegrep/sf.sh
;;
esac
return 0
if [ -z $notename ]; then
echo "Invalid input."
cd $DIR
return 0
elif [ -z $regex ]; then
echo "No pattern given."
cd $DIR
return 0
fi
do_grep
fi
if [ -z $notename ]; then
echo "Invalid input."
cd $DIR
return 0
elif [ -z $regex ]; then
echo "No pattern given."
cd $DIR
return 0
fi
do_grep
unset GREP_OPTIONS
unset -f check_params
unset -f do_grep