-
Notifications
You must be signed in to change notification settings - Fork 8
/
envoy.lua
49 lines (45 loc) · 1.04 KB
/
envoy.lua
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
44
45
46
47
48
49
--
-- Copyright (c) 2015 Shengyou Fan
--
--------------------------------------------------------------------------------
local function flags(...)
local p = clink.arg.new_parser()
p:set_flags(...)
return p
end
local envoy_basic_options = {
"--help", "-h",
"--quiet", "-q",
"--verbose", "-v", "-vv", "-vvv",
"--version", "-V",
"--ansi",
"--no-ansi",
"--no-interaction", "-n"
}
local envoy_basic_parser = clink.arg.new_parser()
envoy_basic_parser:set_flags(envoy_basic_options)
envoy_basic_parser:set_arguments({
"help" .. flags(
"--xml",
"--format",
"--raw",
envoy_basic_options
),
"init" .. flags(envoy_basic_options),
"list" .. flags(
"--xml",
"--format",
"--raw"
),
"run" .. flags(
"--pretend",
envoy_basic_options
),
"ssh" .. flags(
"--user",
envoy_basic_options
),
"tasks" .. flags(envoy_basic_options),
})
clink.arg.register_parser("envoy", envoy_basic_parser)
clink.arg.register_parser("envoy", envoy_basic_options)