forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash.sh
More file actions
30 lines (27 loc) · 947 Bytes
/
Copy pathbash.sh
File metadata and controls
30 lines (27 loc) · 947 Bytes
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
###-begin-{pkgname}-completion-###
if type complete &>/dev/null; then
_{pkgname}_completion () {
local words cword
if type _get_comp_words_by_ref &>/dev/null; then
_get_comp_words_by_ref -n = -n @ -n : -w words -i cword
else
cword="$COMP_CWORD"
words=("${COMP_WORDS[@]}")
fi
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
{completer} completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
if [ "$COMPREPLY" = "__tabtab_complete_files__" ]; then
COMPREPLY=($(compgen -f -- "$cword"))
fi
if type __ltrim_colon_completions &>/dev/null; then
__ltrim_colon_completions "${words[cword]}"
fi
}
complete -o default -F _{pkgname}_completion {pkgname}
fi
###-end-{pkgname}-completion-###