forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfish.sh
More file actions
22 lines (19 loc) · 654 Bytes
/
Copy pathfish.sh
File metadata and controls
22 lines (19 loc) · 654 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
###-begin-{pkgname}-completion-###
function _{pkgname}_completion
set cmd (commandline -o)
set cursor (commandline -C)
set words (count $cmd)
set completions (eval env DEBUG=\"" \"" COMP_CWORD=\""$words\"" COMP_LINE=\""$cmd \"" COMP_POINT=\""$cursor\"" {completer} completion -- $cmd)
if [ "$completions" = "__tabtab_complete_files__" ]
set -l matches (commandline -ct)*
if [ -n "$matches" ]
__fish_complete_path (commandline -ct)
end
else
for completion in $completions
echo -e $completion
end
end
end
complete -f -d '{pkgname}' -c {pkgname} -a "(_{pkgname}_completion)"
###-end-{pkgname}-completion-###