-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompletions
38 lines (31 loc) · 930 Bytes
/
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
35
36
37
#!/usr/bin/env bash
complete -F __start_kubectl k
source <(npm completion)
function _dotnet_bash_complete() {
local word=${COMP_WORDS[COMP_CWORD]}
local completions
completions="$(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)"
if [ $? -ne 0 ]; then
completions=""
fi
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
}
complete -f -F _dotnet_bash_complete dotnet
function _makefile_complete {
local curr_arg;
local targets;
targets=''
if [[ -e "$(pwd)/Makefile" ]]; then
targets=$( \
grep -oE '^[a-zA-Z0-9_-]+:' Makefile \
| sed 's/://' \
| tr '\n' ' ' \
)
fi
curr_arg=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "${targets[@]}" -- $curr_arg ) );
}
complete -F _makefile_complete make
complete -F __start_eim eim
source /usr/share/bash-completion/completions/git
__git_complete g __git_main