From b344242dff5ae1098a412d390b56231b9f3b4c8e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 5 Feb 2020 23:51:49 +0100 Subject: [PATCH] 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. --- styler/.local/bin/styler | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/styler/.local/bin/styler b/styler/.local/bin/styler index 813e779..1d5f683 100755 --- a/styler/.local/bin/styler +++ b/styler/.local/bin/styler @@ -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 will be lost upon restart, or application restarts." \ + " 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)." \ - " Same as 'theme' option, but changes will be made permanent." \ + " 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" \ - " into the processor directory. Use user/repo format to automatically pull from github." \ + " list [processors|template|themes] Print out all currently installed processors, templates, or themes from selection. " \ "" \ - " -h | help Print out this help." \ + " 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." \ "" \ - " -v | version Print out program information." \ + " help | -h | --help Print out this help." \ + "" \ + " version | -v | --version Print out program information." \ "" \ "" }