diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2016-10-11 14:09:33 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2016-10-11 14:09:33 +0200 |
| commit | d8329f78d2743317d1cb54509805ce9280ebec7f (patch) | |
| tree | 2a66f70cf0504d07b4c4241205e8c78f20803a98 | |
| parent | ea940218791cd59d3726158365ca61dc24a91030 (diff) | |
| download | mark-d8329f78d2743317d1cb54509805ce9280ebec7f.tar.gz mark-d8329f78d2743317d1cb54509805ce9280ebec7f.zip | |
move mark.fish and fix function calls without options
| -rw-r--r-- | mark.fish (renamed from functions/mark.fish) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/functions/mark.fish b/mark.fish index 39e1b16..eb92b11 100644 --- a/functions/mark.fish +++ b/mark.fish @@ -14,7 +14,7 @@ function __mark_get --description 'extract information from a mark_store' set range 0 # parse argv - for i in (seq 1 (count $argv)) + for i in (seq 2 (count $argv)) if string match -q -- "-y=*" "$argv[$i]" set year (string replace -- "-y=" "" $argv[$i]) else if string match -q -- "-m=*" "$argv[$i]" @@ -170,7 +170,7 @@ function __mark_print_month --description "print overview over a month" set year (date "+%Y") # parse argv - for i in (seq 1 (count $argv)) + for i in (seq 2 (count $argv)) if string match -q -- "-y=*" "$argv[$i]" set year (string replace -- "-y=" "" $argv[$i]) else if string match -q -- "-m=*" "$argv[$i]" @@ -247,7 +247,7 @@ function __mark_set --description 'mark a day in a store' set year (date +"%Y") # parse argv - for i in (seq 1 (count $argv)) + for i in (seq 2 (count $rgv)) if string match -q -- "-d=*" "$argv[$i]" set day (string replace -- "-d=" "" $argv[$i]) else if string match -q -- "-m=*" "$argv[$i]" @@ -335,10 +335,10 @@ function mark switch $argv[1] case "set" "s" - __mark_set $argv[2..-1] + __mark_set $argv[1..-1] case "get" "g" - __mark_get $argv[2..-1] + __mark_get $argv[1..-1] case "month" "m" - __mark_print_month $argv[2..-1] + __mark_print_month $argv[1..-1] end end |
