1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-04-14 10:47:19 +00:00

__ltrim_colon_completions is not always available on macOS ()

* __ltrim_colon_completions is not always available on macOS, so bash-completion should check first
This commit is contained in:
Lucy Davies 2017-06-05 16:18:07 +01:00 committed by Eric Paris
parent 8d4ce3549a
commit 66da711334

View file

@ -132,7 +132,10 @@ __handle_reply()
declare -F __custom_func >/dev/null && __custom_func
fi
__ltrim_colon_completions "$cur"
# available in bash-completion >= 2, not always present on macOS
if declare -F __ltrim_colon_completions >/dev/null; then
__ltrim_colon_completions "$cur"
fi
}
# The arguments should be in the form "ext1|ext2|extn"