/usr/share/bash-completion/completions/licensing-completion.bash is in licenseutils 0.0.9-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # automatically generated by licenseutils 0.0.8pre
_licensing_complete()
{
local cur prev opts moreopts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
command=`echo ${COMP_LINE} | cut -f2 -d' '`
moreopts=""
if [[ "$command" == choose ]]; then
lic=`licensing --list-all-licenses`
sty=`licensing --list-styles`
moreopts=`echo "$lic no-license $sty no-style" | tr '
' ' '`
else
moreopts=`licensing help | grep "^ [a-z]" | cut -f3 -d' ' | tr '
,' ' '`
fi
if [[ "${cur}" == -* ]] ; then
opts=`licensing help $command | egrep "(^ -., |^ --)" | cut -c7-29 | sed -e 's/=[A-Z]* //g' | tr '\n,' ' ' | tr -s " "`
COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
elif [[ "${moreopts}" != "" ]] ; then
COMPREPLY=($(compgen -W "${moreopts}" -- "${cur}"))
else
COMPREPLY=()
fi
return 0
}
complete -F _licensing_complete licensing pssc
|