1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00
github.com_openSUSE_osc/contrib/complete.sh
Jiri Slaby 52ca9f03c0 fix autocompletion for new locations
When complete is installed in /usr/share or /usr/lib64, the last test
command (/usr/lib) fails and causes whole osc automcompletion to fail.

Fix it by adding a 'return' to the former two -- if they succeed.
2023-10-24 11:07:45 +02:00

7 lines
428 B
Bash

test -z "$BASH_VERSION" && return
complete -o default _nullcommand >/dev/null 2>&1 || return
complete -r _nullcommand >/dev/null 2>&1 || return
test -s /usr/share/osc/complete && complete -o default -C /usr/share/osc/complete osc && return
test -s /usr/lib64/osc/complete && complete -o default -C /usr/lib64/osc/complete osc && return
test -s /usr/lib/osc/complete && complete -o default -C /usr/lib/osc/complete osc