Skip to content

Commit 81e1e46

Browse files
committed
simplify _path_files function call for args
1 parent 646bd78 commit 81e1e46

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

completions/mage.zsh

+2-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ local -a targets
77

88
_arguments -C \
99
'-clean[clean out old generated binaries from CACHE_DIR]' \
10-
'-compile[output a static binary to the given path]:compilepath:->compilepath' \
10+
'-compile[output a static binary to the given path]:compilepath:_path_files' \
1111
'-init[create a starting template if no mage files exist]' \
1212
'-h[show help]' \
1313
'-l[list mage targets in this directory]' \
14-
'-d[directory to read magefiles from (default "." or "magefiles" if exists)]:magepath:->magepath' \
14+
'-d[directory to read magefiles from (default "." or "magefiles" if exists)]:magepath:_path_files -/' \
1515
'-debug[turn on debug messages]' \
1616
'-f[force recreation of compiled magefile]' \
1717
'-goarch[sets the GOARCH for the binary created by -compile (default: current arch)]' \
@@ -52,12 +52,6 @@ case "$state" in
5252
_get_targets || ret=1
5353
_describe 'mage' targets && ret=0
5454
;;
55-
compilepath)
56-
_path_files && ret=0
57-
;;
58-
magepath)
59-
_path_files -/ && ret=0
60-
;;
6155
esac
6256

6357
return ret

0 commit comments

Comments
 (0)