Giving a list of commands if invalid commands or no command sent

This commit is contained in:
Siina Mashek 2024-10-14 11:03:07 +03:00
parent 69963e62ba
commit 7888735e2d

View File

@ -20,7 +20,7 @@ if [[ -z "$ICLOUD_USERNAME" ]]; then
exit 1
fi
# tmux session name
# Set tmux session name
session="icloudsync"
attach () {
@ -63,8 +63,9 @@ status () {
fi
}
msg="available commands are: start, stop, attach, status"
if [[ $# -eq 0 ]]; then
echo "Available commands are: start, stop, attach, status"
echo $msg
fi
while [[ $# -gt 0 ]]; do
@ -82,5 +83,7 @@ while [[ $# -gt 0 ]]; do
status
;;
esac
echo $msg
exit
done