-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_smake
43 lines (35 loc) · 940 Bytes
/
_smake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#compdef smake
local curcontext="$curcontext" state line
typeset -A opt_args
local subcmds
subcmds=(scan list regenerate)
if [[ $service == "smake" ]]; then
_arguments -C -A "-*" \
'--help[show help for this command and exit]' \
'*::command:->subcmd' && return 0
if (( CURRENT == 1 )); then
_wanted commands expl 'smake command' compadd -a subcmds
return
fi
service="$words[1]"
curcontext="${curcontext%:*}=$service:"
fi
case $service in
(scan)
_arguments \
'--full[Perform a full scan, ignoring existing Makefile]' \
'--update[Perform a partial scan, updating existing Makefile]' \
'--ask[Ask whether to perform a full scan or an update (default)]' \
'1:directory:_path_files -/' \
'::makefile:_files'
;;
(list)
_files
;;
(regenerate)
_files
;;
(*)
_message "unknown smake command completion: $service"
;;
esac