[scripts] Add vcpkg_completions.zsh (#18274)

* Add vcpkg_completions.zsh

* Update scripts/vcpkg_completion.zsh
This commit is contained in:
autoantwort 2021-06-30 22:16:51 +02:00 committed by GitHub
parent bdc455256a
commit 640c439df7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,9 @@
_vcpkg_completions()
{
local vcpkg_executable=${COMP_WORDS[0]}
local remaining_command_line=${COMP_LINE:(${#vcpkg_executable}+1)}
COMPREPLY=($(${vcpkg_executable} autocomplete "${remaining_command_line}" -- 2>/dev/null))
}
complete -F _vcpkg_completions vcpkg