home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab039e8
)
Add usage help
author
Siraaj Khandkar
<siraaj@khandkar.net>
Thu, 4 Aug 2022 20:35:50 +0000
(16:35 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Thu, 4 Aug 2022 20:35:50 +0000
(16:35 -0400)
home/bin/wallpaper_review
patch
|
blob
|
blame
|
history
diff --git
a/home/bin/wallpaper_review
b/home/bin/wallpaper_review
index
66d7e4f
..
8b15bcb
100755
(executable)
--- a/
home/bin/wallpaper_review
+++ b/
home/bin/wallpaper_review
@@
-154,11
+154,30
@@
key | action
EOF
}
EOF
}
+usage() {
+ cat <<EOF >&2
+
+$(basename "$0") [cmd]
+
+cmd | args | meaning
+----+-------+------------------------------------------------
+ f | | favorites
+ d | <dir> | from given dir
+ a | | all from $DIR_WALLPAPERS <- DEFAULT if no cmd.
+ h | | usage help. i.e. this message.
+----+-------+------------------------------------------------
+
+EOF
+}
+
main() {
case "$1" in
f | fav) paths_set_from_favs;;
d | dir) paths_set_from_dir_find "$2";;
a | all) paths_set_from_dir_find "$DIR_WALLPAPERS";;
main() {
case "$1" in
f | fav) paths_set_from_favs;;
d | dir) paths_set_from_dir_find "$2";;
a | all) paths_set_from_dir_find "$DIR_WALLPAPERS";;
+ h | -h | help | -help | --help)
+ usage;
+ exit 1;;
'')
paths_set_from_dir_find "$DIR_WALLPAPERS";;
*)
'')
paths_set_from_dir_find "$DIR_WALLPAPERS";;
*)
This page took
0.019954 seconds
and
4
git commands to generate.