First commit: add help and usage
This commit is contained in:
parent
6e9061c952
commit
9bceb2fffa
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
PROGNAME=${0##*/}
|
||||
VERSION="0.0.1"
|
||||
|
||||
error_exit() {
|
||||
printf "%s: %s\n" "$PROGNAME" "${1:-"Unknown Error"}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage() {
|
||||
printf "usage: %s [OPTIONS] COMMAND [ARGS]\n" "$PROGNAME"
|
||||
printf "Simple client for twtxt\n"
|
||||
printf "Options:\n
|
||||
-c, --config PATH Specify a custom config file location.
|
||||
-v, --verbose Enable verbose output for debugging purposes.
|
||||
--version Show the version and exit.
|
||||
-h, --help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
config Get or set config item.
|
||||
follow Add a new source to your followings.
|
||||
following Return the list of sources you’re following.
|
||||
quickstart Quickstart wizard for setting up twtxt.
|
||||
timeline Retrieve your personal timeline.
|
||||
tweet Append a new tweet to your twtxt file.
|
||||
unfollow Remove an existing source from your...
|
||||
view Show feed of given source.
|
||||
registry Show registers\n"
|
||||
}
|
||||
case $1 in
|
||||
-h | --help)
|
||||
usage; exit ;;
|
||||
-* | --*)
|
||||
usage; error_exit "unknown option $1" ;;
|
||||
*)
|
||||
echo " Work in Progress "
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue