Bug 1216531 - osc completion defunct
Summary: osc completion defunct
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marco Strigl
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-24 09:02 UTC by Jiri Slaby
Modified: 2024-01-09 08:55 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Slaby 2023-10-24 09:02:50 UTC
osc <TAB><TAB>
does not work. It seems autocompletion is broken. In particular,
/usr/share/bash-completion/bash_completion
looks for:
for compfile in "$cmd" "$cmd.bash" "_$cmd"; do

so the installed:
/usr/share/bash-completion/completions/osc.sh
is skipped. The suffix is supposed to be ".bash" or no suffix at all.

If I move it, it's still broken, as the "returned" value is an error from the last command:
test -s /usr/lib/osc/complete   && complete -o default -C /usr/lib/osc/complete osc

If I put 'true' at the end, everything is fine. So the fixed script looks like:
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
Comment 1 Jiri Slaby 2023-10-24 09:10:37 UTC
sr#1119916
and
https://github.com/openSUSE/osc/pull/1441
Comment 2 OBSbugzilla Bot 2023-10-26 07:25:01 UTC
This is an autogenerated message for OBS integration:
This bug (1216531) was mentioned in
https://build.opensuse.org/request/show/1120473 Tools / osc
Comment 4 Daniel Mach 2024-01-09 08:55:47 UTC
Fixed upstream, in Factory and there is an open submission to SLE-15-SP4+.