Closed
Description
…because the basename of binaryName
should be extracted. In the following test, scw
is called with full path, resulting in wrongly named bash function:
$ ~/bin/scw autocomplete script shell=bash
_/home/mid/bin/scw() {
_get_comp_words_by_ref -n = cword words
output=$(/home/mid/bin/scw autocomplete complete bash -- "$COMP_LINE" "$cword" "${words[@]}")
COMPREPLY=($output)
# apply compopt option and ignore failure for older bash versions
[[ $COMPREPLY == *= ]] && compopt -o nospace 2> /dev/null || true
return
}
complete -F _/home/mid/bin/scw /home/mid/bin/scw
😉