Bug 1200467 - zsh completion script for zypper does not account for global options
Summary: zsh completion script for zypper does not account for global options
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Paolo Perego
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-13 07:11 UTC by Bruce Anderson
Modified: 2023-08-07 03:03 UTC (History)
1 user (show)

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


Attachments
New version of the file (6.43 KB, text/plain)
2022-06-21 01:14 UTC, Bruce Anderson
Details
Patch created with diff -c (1.50 KB, patch)
2022-06-21 01:16 UTC, Bruce Anderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Anderson 2022-06-13 07:11:49 UTC
The zsh completion script (/usr/share/zsh/functions/Completion/openSUSE/_zypper) does not handle global options prior to the command. For example if you type

% zypper search

and then hit <tab> it gives you the valid options for the search command. If on the other hand if you type (the perfectly valid):

% zypper --no-refresh search

and hit tab, it doesn't give any valid options even though it should give the same options as in the first example.

If you type:

% zypper

and hit tab, it correctly lists the available global options along with the commands but if you enter one of the global options it will not do any further completion.
Comment 1 Bruce Anderson 2022-06-21 01:14:14 UTC
Created attachment 859721 [details]
New version of the file
Comment 2 Bruce Anderson 2022-06-21 01:16:42 UTC
Created attachment 859722 [details]
Patch created with diff -c
Comment 3 Bruce Anderson 2022-06-21 01:20:05 UTC
Added a possible new version of the completion file. I don't do a massive amount of zsh scripting so I'm not sure if this is the optimal or preferred way of doing this but it works for my test cases.