add star case to getopts

This commit is contained in:
Greg Gauthier 2022-12-25 10:22:02 +00:00
parent 657766ca06
commit 6f4562fff0
1 changed files with 6 additions and 4 deletions

10
new
View File

@ -10,9 +10,9 @@ Help()
echo
echo "Syntax: new -c contentType -t 'some title'"
echo "options:"
echo "c Content Type: 'post', 'podcast', 'reading'"
echo "t Content Title: \"Any Plain Text At All\""
echo "h This display."
echo "-c [required] Content Type: 'post', 'podcast', 'reading'"
echo "-t [required] Content Title: \"Any Plain Text At All\""
echo "-h This display."
exit 0
}
@ -21,7 +21,9 @@ do
case "${flag}" in
c) contentType=${OPTARG};;
t) title=${OPTARG};;
h) Help
h) Help;;
*) echo "-h for help" >&2
exit 1 ;;
esac
done