You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asking yargs to generate the completion in a git-bash session on windows produces the following completion function:
_main_yargs_completions()
{
local cur_word args type_list
cur_word="${COMP_WORDS[COMP_CWORD]}"
args=("${COMP_WORDS[@]}")
# ask yargs to generate completions.
type_list=$(C:\Program Files\nodejs\node_modules\my-program\bin\main --get-yargs-completions "${args[@]}")
COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )
# if no match was found, fall back to filename completionif [ ${#COMPREPLY[@]}-eq 0 ];then
COMPREPLY=()
fireturn 0
}
complete -o bashdefault -o default -F _main_yargs_completions main
The path to the program is returned windows style instead of unix style.
By replacing C:\Program Files\nodejs\node_modules\my-program\bin\main with /c/Program Files/nodejs/node_modules/my-program/bin/main everything works correctly.
I am using yargs 17.7.2
The text was updated successfully, but these errors were encountered:
Asking yargs to generate the completion in a git-bash session on windows produces the following completion function:
The path to the program is returned windows style instead of unix style.
By replacing
C:\Program Files\nodejs\node_modules\my-program\bin\main
with/c/Program Files/nodejs/node_modules/my-program/bin/main
everything works correctly.I am using yargs 17.7.2
The text was updated successfully, but these errors were encountered: