Skip to content

Commit

Permalink
fix autocompletion for new locations
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jiri Slaby committed Oct 24, 2023
1 parent ea7bebf commit 52ca9f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/complete.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 52ca9f0

Please sign in to comment.