Further sanitization of variables; checks out with shellcheck.net now

This commit is contained in:
Jon-William Lewis
2015-06-10 08:35:16 -05:00
parent 9334f3ba45
commit 121abb1df7
10 changed files with 60 additions and 64 deletions

View File

@@ -1,10 +1,10 @@
function delete(){
if [ "$DELETE" == "TRUE" ]; then
if [ -e $NOTE -o -e ${NOTE%.*} ]; then
if [ -e "$NOTE" -o -e "${NOTE%.*}" ]; then
if [ "$ENCRYPTION" == "TRUE" ]; then
rm ${NOTE%.*}
rm "${NOTE%.*}"
else
rm $NOTE
rm "$NOTE"
fi
echo ""
echo "Deleted note: $NOTEBOOK/$SECTION$NAME."