aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-todos
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-01 19:30:33 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-03-01 19:30:33 +0200
commit3ca95b33f2dc650b384a96dc1d3aa3d8d18553d1 (patch)
tree83dcd8a473d78788e852bccfc3b187ab7b54e466 /bin/ak-todos
parentf8d2236e55e5c369b218017d1de1058d6a8ee361 (diff)
downloadarching-kaos-tools-3ca95b33f2dc650b384a96dc1d3aa3d8d18553d1.tar.gz
arching-kaos-tools-3ca95b33f2dc650b384a96dc1d3aa3d8d18553d1.tar.bz2
arching-kaos-tools-3ca95b33f2dc650b384a96dc1d3aa3d8d18553d1.zip
Changes help subcommand to flag style -h, --help
Diffstat (limited to 'bin/ak-todos')
-rwxr-xr-xbin/ak-todos35
1 files changed, 17 insertions, 18 deletions
diff --git a/bin/ak-todos b/bin/ak-todos
index 4a0a8ea..741a2f9 100755
--- a/bin/ak-todos
+++ b/bin/ak-todos
@@ -109,25 +109,24 @@ EOF
fi
}
_ak_modules_todos_usage(){
- _ak_modules_todos_title
- 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 todos files"
- echo "import <file> #TODO"
- echo "add <file> Creates a data file from the todos file you point to"
- echo "create Vim is going to pop up, you will write and save your"
- echo " todosletter and it's going to be saved"
- exit 0
+ _ak_modules_todos_title
+ echo ""
+ echo "-h, --help Prints this help message"
+ echo "index Prints an indexed table of your todos files"
+ echo "import <file> #TODO"
+ echo "add <file> Creates a data file from the todos file you point to"
+ echo "create Vim is going to pop up, you will write and save your"
+ echo " todosletter and it's going to be saved"
+ exit 0
}
if [ ! -z $1 ]; then
- case $1 in
- help) _ak_modules_todos_usage; exit;;
- index) _ak_modules_todos_index; exit;;
- import) _ak_modules_todos_import $2; exit;;
- add) _ak_modules_todos_add $2; exit;;
- create) _ak_modules_todos_create; exit;;
- * ) _ak_modules_todos_usage;;
- esac
+ case $1 in
+ -h | --help) _ak_modules_todos_usage; exit;;
+ index) _ak_modules_todos_index; exit;;
+ import) _ak_modules_todos_import $2; exit;;
+ add) _ak_modules_todos_add $2; exit;;
+ create) _ak_modules_todos_create; exit;;
+ * ) _ak_modules_todos_usage;;
+ esac
else _ak_modules_todos_usage
fi