From 52ca9f03c09dcef1f8a40ed88914797120943290 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 24 Oct 2023 11:07:45 +0200 Subject: [PATCH] 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. --- contrib/complete.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/complete.sh b/contrib/complete.sh index 6148b40ecc..1ba791ba6a 100644 --- a/contrib/complete.sh +++ b/contrib/complete.sh @@ -1,6 +1,6 @@ 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 -test -s /usr/lib64/osc/complete && complete -o default -C /usr/lib64/osc/complete osc +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