-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.conf
81 lines (75 loc) · 2.09 KB
/
example.conf
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[env]
# Default Options
#
# These don't need to be set here explicitly
# In a minimal configuration you could leave out the [env] section
# completely. The CLI config variables would have the following values
__CLI_CFG_EXEC_ACK_EXPANDED_COMMANDS="y"
__CLI_CFG_EXEC_EXPAND_ABBREVIATED_COMMANDS="y"
__CLI_CFG_EXEC_EXPAND_ABBREVIATED_ARGS="n"
__CLI_CFG_EXEC_PRINT_HELP_ON_INCOMPLETE_ARGS="y"
__CLI_CFG_EXEC_ARGS_ALLOW_COMPLETION_RESULTS_ONLY="n"
__CLI_CFG_EXEC_ALWAYS_RETURN_0="n"
__CLI_CFG_EXEC_SILENT="n"
__CLI_CFG_LOG_LEVEL=0
# example varibale defining possible completion options for commands
# (needs to be used explicititly - see below)
export __VAR_EXPANSION_WORDS="first \
second"
# another one
export ARGUMENT_OPTIONS="option1 \
option2 \
option3"
# example function returning completion options
function create_cmd_words() {
echo "thievery"
echo "corporation"
}
# example function returning completion options for an argument
function create_arg_options() {
echo "opt1"
echo "opt2"
}
[commands]
# demonstration of positional argument expansion
# \0: is the last command word (echo)
echo: \0 \2 \1
:arg1:list:first
:arg2:list:second
# demonstration of parameterized command word with variable
var-expansion
$__VAR_EXPANSION_WORDS: echo \0
# demonstration of parameterized command word with function
function-expansion
&create_cmd_words: echo \0
# demonstration of parameterized command word with static list
list-expansion
thievery|corporation: echo \0
# demonstration of list argument types
list-argument
# static arg list demo
static: echo
:one-of-a-static-list:list:first-element|second|third|etc
# arg list from function demo
from-function: echo
:arg-generated-by-function:eval:create_arg_options
# arg list from variable demo
from-variable: echo
:arg-from-variable:list:$ARGUMENT_OPTIONS
# example to test failing command exit code
false: false
return2: return 2
# example of deeper structure
install
jar
from
file: echo
:jar-file:FILE
maven: echo
:mvn-coords:list:a|b|c
war
from
file: echo
:war-file:FILE
maven: ~/bin/install-maven-war.sh
:mvn-coords:list:a|b|c