Further sanitization of variables; checks out with shellcheck.net now
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user