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;
|
||||
|
||||
fi
|
||||
if [ $create == "y" ] || [ $create == "Y" ] || [ $create == "yes" ] || [ $create == "YES" ] || [ $create == "Yes" ]; then
|
||||
case $create in Y|Yes|YES|Yes|y )
|
||||
newnote
|
||||
fi
|
||||
esac
|
||||
|
||||
clear
|
||||
cd $dir
|
||||
|
@ -53,7 +53,7 @@ function quickread() {
|
|||
else
|
||||
clear
|
||||
echo "No such note."
|
||||
cd ~
|
||||
cd
|
||||
fi
|
||||
cd $dir
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue