Standardize and document styler cli commands

Removed superfluous styler `--theme`-style options, instead relying on
the commands provided to be the primary way of interaction.

Documented the new standardized ways with the `help` command and added
improved documentation for all avaliable options.
This commit is contained in:
Marty Oehme 2020-02-05 23:51:49 +01:00
parent d1438b216c
commit b344242dff

View file

@ -12,16 +12,16 @@ main() {
local ret=0
case "$1" in
-t | --theme | theme)
theme)
cmd="switch_theme"
;;
-s | --set | set)
set)
cmd="set_theme"
;;
-l | --list | list)
list)
cmd="list"
;;
-d | --download | download)
download)
cmd="download"
;;
-v | --version | version)
@ -42,25 +42,27 @@ main() {
usage() {
printf "%s\n" \
"" \
" styler - Quickly switch your linux style." \
" styler Quickly switch your linux style." \
" Uses base16 themes to quickly set them for a variety of applications." \
"" \
" Usage: styler [-hv | set base16-themename]" \
" Usage: styler [-hv][set|theme base16-themename]" \
"" \
" Options:" \
" Arguments:" \
"" \
" -t | theme Temporarily switch theme. Use any valid base16 theme name (without base16- prefix)." \
" theme [theme] Temporarily switch theme. Use any valid base16 theme name (without base16- prefix)." \
" Theme will be lost upon restart, or application restarts." \
"" \
" -s | set Set the theme. Use any valid base16 theme name (without base16- prefix)." \
" set [theme] Set the theme. Use any valid base16 theme name (without base16- prefix)." \
" Same as 'theme' option, but changes will be made permanent." \
"" \
" -d | download Download a base16 template into the package directory or download a processor16" \
" list [processors|template|themes] Print out all currently installed processors, templates, or themes from selection. " \
"" \
" download [username/repository] Download a base16 template into the package directory or download a processor16" \
" into the processor directory. Use user/repo format to automatically pull from github." \
"" \
" -h | help Print out this help." \
" help | -h | --help Print out this help." \
"" \
" -v | version Print out program information." \
" version | -v | --version Print out program information." \
"" \
""
}