forked from sonick13/PerlProjects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
completions
34 lines (29 loc) · 1.04 KB
/
completions
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
#!/usr/bin/env bash
#cito M:644 O:0 G:0 T:/usr/share/bash-completion/completions/cheater
#------------------------------------------------------------------------------
# Project Name - PerlProjects/source/cheater/completions
# Started On - Mon 29 Jan 18:47:58 GMT 2018
# Last Change - Thu 26 Nov 06:21:38 GMT 2020
# Author E-Mail - [email protected]
# Author GitHub - https://github.com/terminalforlife
#------------------------------------------------------------------------------
# This is the bash completion script for `cheater`.
#------------------------------------------------------------------------------
_cheater(){
GetArgs(){
local CurLine Word
while read -a Line; do
[ "${Line[0]:0:1}" == '-' ] || continue
for Field in "${Line[@]}"; {
if [ "$Field" == '-' ]; then
break
elif [[ $Field == -* ]]; then
Field=${Field//\[*\]/}
printf '%s ' "${Field//,/}"
fi
}
done <<< "$(cheater -h)"
}
COMPREPLY=($(compgen -W "$(GetArgs)" -- "$2"))
}
complete -F _cheater cheater