diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-08-28 14:07:54 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-08-28 14:07:54 +0200 |
| commit | 42f1d9af0b67e47414172b51a6a10177027a6572 (patch) | |
| tree | 63b99e631f67e33e650fdec3813372ab9a25cfa0 /functions/mark.fish | |
| parent | b9dee810cd553d701cb2a6f858a867775e8dd56f (diff) | |
| download | mark-42f1d9af0b67e47414172b51a6a10177027a6572.tar.gz mark-42f1d9af0b67e47414172b51a6a10177027a6572.zip | |
support --help/-h command line options
Diffstat (limited to 'functions/mark.fish')
| -rw-r--r-- | functions/mark.fish | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/functions/mark.fish b/functions/mark.fish index 8c6080f..80e373b 100644 --- a/functions/mark.fish +++ b/functions/mark.fish @@ -112,13 +112,17 @@ function __mark_append_mark --argument mark date end end +function __mark_print_usage + echo "Usage: mark [cmd | <mark>] date [cmd args]" + echo "Cmds:" + echo " print [before] [after]: print marks in range [date-before, date-after]" + echo " edit: open the mark store file in an editor or using xdg-open" +end + function mark --argument cmd date if test -z "$cmd" echo "No cmd specified" - echo "Usage: mark [cmd | <mark>] date [cmd args]" - echo "Cmds:" - echo " print [before] [after]: print marks in range [date-before, date-after]" - echo " edit: open the mark store file in an editor or using xdg-open" + __mark_print_usage return 1 end @@ -134,6 +138,8 @@ function mark --argument cmd date switch "$cmd" case "print" __mark_print_dates $date $argv[3] $argv[4] + case "--help" "-h" + __mark_print_usage case "edit" "e" set store (__mark_find_store) if test ! -z "$VISUAL" |
