From 3ca95b33f2dc650b384a96dc1d3aa3d8d18553d1 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Fri, 1 Mar 2024 19:30:33 +0200 Subject: Changes help subcommand to flag style -h, --help --- bin/ak-categories | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'bin/ak-categories') diff --git a/bin/ak-categories b/bin/ak-categories index 32edb4f..e50e1fc 100755 --- a/bin/ak-categories +++ b/bin/ak-categories @@ -97,23 +97,21 @@ EOF fi } _ak_modules_categories_usage(){ - echo "#TODO" - echo "All you need to know is that there are two options available:" - echo "help Prints this help message" - echo "index Prints an indexed table of your news files" - echo "import #TODO" - echo "add Creates a data file from the news file you point to" - echo "create Vim is going to pop up, you will write and save your" - echo " newsletter and it's going to be saved" - exit 0 + echo " -h, --help Prints this help message" + echo " index Prints an indexed table of your news files" + echo " import #TODO" + echo " add Creates a data file from the news file you point to" + echo " create Vim is going to pop up, you will write and save your" + echo " newsletter and it's going to be saved" + exit 0 } _ak_modules_categories_title if [ ! -z $1 ]; then - case $1 in - help) _ak_modules_categories_usage; exit;; - index) _ak_modules_categories_index; exit;; - import) _ak_modules_categories_import $2; exit;; - add) _ak_modules_categories_add $2; exit;; + case $1 in + -h | --help) _ak_modules_categories_usage; exit;; + index) _ak_modules_categories_index; exit;; + import) _ak_modules_categories_import $2; exit;; + add) _ak_modules_categories_add $2; exit;; create) _ak_modules_categories_create; exit;; * ) _ak_modules_categories_usage;; esac -- cgit v1.2.3