-
Notifications
You must be signed in to change notification settings - Fork 0
/
completely.bash
147 lines (110 loc) · 6.65 KB
/
completely.bash
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# parseArger completion -*- shell-script -*-
# This bash completions script was generated by
# completely (https://github.com/dannyben/completely)
# Modifying it manually is not recommended
_parseArger_completions_filter() {
local words="$1"
local cur=${COMP_WORDS[COMP_CWORD]}
local result=()
if [[ "${cur:0:1}" == "-" ]]; then
echo "$words"
else
for word in $words; do
[[ "${word:0:1}" != "-" ]] && result+=("$word")
done
echo "${result[*]}"
fi
}
_parseArger_completions() {
local cur=${COMP_WORDS[COMP_CWORD]}
local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")
local compline="${compwords[*]}"
case "$compline" in
'completely'*'--subcommand-directory')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'completely'*'--completion-file')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'completely'*'--subcmd-dir')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'completely'*'--extra-file')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'bulk-parse'*'--directory')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'completely'*'--yaml-file')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'document'*'--directory')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'bulk-parse'*'--folder')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'completely'*'--source')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'project'*'--directory')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'bulk-parse'*'--file')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'document'*'--folder')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'project installer'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--git-repo --git-service")" -- "$cur" )
;;
'project webserver'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--route --url --file")" -- "$cur" )
;;
'project git-init'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--add --commit")" -- "$cur" )
;;
'document'*'--file')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'document'*'--out')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'project'*'--dir')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
;;
'project'*'--cp')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -A directory -- "$cur" )
;;
'bulk-parse'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--bump --file -f --directory --folder -d --sub-directory --no-sub-directory")" -- "$cur" )
;;
'completely'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_parseArger_completions_filter "--pos -p --opt -o --flag -f --set -s --source -l --help-message -m --help-option --help-short-option --leftovers-name --version-opt-name --version-short-option --verbose-opt-name --subcommand-directory --subcmd-dir --completely-cmd --cmpcmd --extra-file --yaml-file --completion-file --version-opt --no-version-opt --use-verbose --no-use-verbose --run-completely --no-run-completely --no-run --discover-subcommand --no-discover-subcommand")" -- "$cur" )
;;
'html-form'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--command --action --form-class --input-container-class --input-class --label-class --select-class --checkbox-container-class --radio-container-class --checkbox-class --radio-class --checkbox-label-class --radio-label-class --parent-form --form --no-form --button --no-button --js --no-js --result --no-result")" -- "$cur" )
;;
'document'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--file -f --directory --folder -d --out -o --tag --next-tag-prepend --title --title-tag --sub-directory --no-sub-directory --append-output --no-append-output")" -- "$cur" )
;;
'generate'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "--pos -p --opt -o --flag -f --set -s --source -l --help-message -m --help-option --help-short-option --leftovers-name --use-shebang --set-version --version-opt-name --version-short-option --die-fn-name --log-fn-name --verbose-opt-name --verbose-level --nested --history --history-offset --history-file --dependencies --leftovers --no-leftovers --bang --no-bang --version-opt --no-version-opt --use-verbose --no-use-verbose --parse-leftovers --no-parse-leftovers")" -- "$cur" )
;;
*'--output')
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
;;
'project'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "git-init installer git-init mkfile webserver --description --project-help --directory --dir -d --project-subcommand-dir --subcommand-directory --project-subcommand --completely --document --html-form --cp --installer-git-service --git-provider --installer-git-repo --git-repo --git-add --git-commit --commit --readme --no-readme --git --no-git --makefile --no-makefile --web-server --no-web-server")" -- "$cur" )
;;
'parse'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_parseArger_completions_filter "--pos -p --opt -o --flag -f --nested --set -s --source -l --set-version --dependencies --inplace --no-inplace -i --leftovers --no-leftovers --parse-leftovers --no-parse-leftovers")" -- "$cur" )
;;
*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_parseArger_completions_filter "bulk-parse completely document generate html-form parse project --output --prepend --no-prepend")" -- "$cur" )
;;
esac
} &&
complete -F _parseArger_completions parseArger
# ex: filetype=sh