Bug 1379002

Summary: dnf wildcard does not return results
Product: [Fedora] Fedora Reporter: userfed <bwp6>
Component: dnfAssignee: rpm-software-management
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: bwp6, jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 11:19:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description userfed 2016-09-23 21:31:27 UTC
Description of problem:
when using dnf with the "list" option and a s* (wildcard with s) no results are returned. If I use other letters or partial words results are returned.
this is probably true for other dnf options like "install"

Version-Release number of selected component (if applicable):
DNF version: 1.1.10

How reproducible:
always

Steps to Reproduce:
1.as root run dnf list s*
2.the commmand returns no results
3.as root run dnf list t*
4.the cammmand returns results.

Actual results:
No results are shown for "s" and a wildcard

Expected results:
should see results like using other letters

Additional info:

Comment 1 Igor Gnatenko 2016-09-24 06:52:00 UTC
I think bash expands 's*' to real filenames. Try:
* dnf list 's*'
or
* dnf list s\*

Comment 2 userfed 2016-09-24 14:21:40 UTC
your suggestion s\* worked. Thanks

dnf handles s* differently.  If I do a "ls s*" or "ls t*" the results are as expected, listing for files starting with s or t, respectively.

The dnf results for t* and other letters is similar to ls but the results for s* is incorrect.

Comment 3 Jaroslav Mracek 2016-09-26 11:19:50 UTC
The problem is related to files or directories that you have in directory from where you execute the command. If you run 'dnf list l*' the shell first take l* argument and try to complete it with file name in the directory. 

Example:
if file lisdd.txt in directory and you run 'dnf list l*' than dnf command is like 'dnf list lisdd.txt'.

But if you run "dnf list 'l*'" then the argument 'l*'is never bash completed by shell and it is always passed into dnf correctly as l*.