Change "if" with "case"
Use better syntax for $create in quicknote.
This commit is contained in:
parent
b9ae8de850
commit
e6615d892e
1 changed files with 3 additions and 3 deletions
|
@ -32,9 +32,9 @@ else
|
||||||
echo -n "Do you want to create one?[Y/N]: " && read create;
|
echo -n "Do you want to create one?[Y/N]: " && read create;
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ $create == "y" ] || [ $create == "Y" ] || [ $create == "yes" ] || [ $create == "YES" ] || [ $create == "Yes" ]; then
|
case $create in Y|Yes|YES|Yes|y )
|
||||||
newnote
|
newnote
|
||||||
fi
|
esac
|
||||||
|
|
||||||
clear
|
clear
|
||||||
cd $dir
|
cd $dir
|
||||||
|
@ -53,7 +53,7 @@ function quickread() {
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
echo "No such note."
|
echo "No such note."
|
||||||
cd ~
|
cd
|
||||||
fi
|
fi
|
||||||
cd $dir
|
cd $dir
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue