Closed lapwat closed 3 years ago
Following documentation does not return the right content on my side.
_CCC_COMPLETE=bash_source ccc
Usage: ccc [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
_CCC_COMPLETE=source_bash ccc
_ccc_completion() {
local IFS=$'
'
COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
_CCC_COMPLETE=complete $1 ) )
return 0
}
_ccc_completionetup() {
local COMPLETION_OPTIONS=""
local BASH_VERSION_ARR=(${BASH_VERSION//./ })
# Only BASH version 4.4 and later have the nosort option.
if [ ${BASH_VERSION_ARR[0]} -gt 4 ] || ([ ${BASH_VERSION_ARR[0]} -eq 4 ] && [ ${BASH_VERSION_ARR[1]} -ge 4 ]); then
COMPLETION_OPTIONS="-o nosort"
fi
complete $COMPLETION_OPTIONS -F _ccc_completion ccc
}
@lapwat I had the same issue. For me, it was due to my version of click
not updating to the latest (expected) version. I use poetry
and my pyproject.toml
had click
as click = "^7.1.2"
from when I initially added the dep, but that means that it will not allow an update that would move click
to version 8.x.x
. If you have a similar situation, either re-add the dep, or directly modify the version specification in pyproject.toml
.
@taranlu-houzz Thanks for your answer. I installed click the day I opened the issue.
In my requirements I only have click
so the latest version should be installed.
I will check which version is installed.
I think there is a mistake in the documentation:
https://click.palletsprojects.com/en/8.0.x/shell-completion/
_{PROG_NAME}_COMPLETE
variable should besource_{shell}
not{shell}_source