snap list doesn't do globbing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Hello, while trying to help a user on IRC today, a helper assumed that the snap list command would perform globbing, similar to the dpkg -l command. However, snap list does not perform globbing:
$ snap list 'b*'
error: no matching snaps installed
$ snap list 'c*'
error: no matching snaps installed
$ snap list
Name Version Rev Tracking Publisher Notes
bandit 1.7.4 108 latest/stable alexmurray✪ -
bare 1.0 5 latest/stable canonical✓ base
canonical-livepatch 10.4.1 164 latest/stable canonical✓ -
chromium 109.0.5414.119 2295 latest/stable canonical✓ -
core 16-2.58 14447 latest/stable canonical✓ core
core18 20230118 2679 latest/stable canonical✓ base
core20 20230126 1822 latest/stable canonical✓ base
cups 2.4.2-5 872 latest/stable openprinting✓ -
cvescan 2.5.0 281 latest/stable canonical✓ -
gnome-3-28-1804 3.28.0-
gnome-3-38-2004 0+git.6f39565 119 latest/stable canonical✓ -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable canonical✓ -
lp-to-jira 0.7 56 latest/stable mclemenceau -
lxd 5.10-b392610 24323 latest/stable canonical✓ -
matterhorn 50200.17.
ssh-audit 2.5.0-2 6 latest/stable positronsecurity -
youtube-dl 2021.12.
In these examples I expected the first command to show me bandit and bare, and the second command to show seven snaps, etc.
Compare dpkg:
$ dpkg -l 'ba*'
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
un backupninja <none> <none> (no description available)
un backuppc <none> <none> (no description available)
un bambootracker <none> <none> (no description available)
un base <none> <none> (no description available)
un base-config <none> <none> (no description available)
ii base-files 11ubuntu5.6 amd64 Debian base system miscellaneous files
ii base-passwd 3.5.47 amd64 Debian base system master password and group files
ii bash 5.0-6ubuntu1.2 amd64 GNU Bourne Again SHell
ii bash-completion 1:2.10-1ubuntu1 all programmable completion for the bash shell
un bash-doc <none> <none> (no description available)
un bash-static <none> <none> (no description available)
ii bat 0.12.1-1ubuntu0.2 amd64 cat(1) clone with syntax highlighting and git integration
$
Thanks
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: snap (not installed)
ProcVersionSign
Uname: Linux 5.4.0-137-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Wed Feb 8 00:59:47 2023
SourcePackage: snap
UpgradeStatus: Upgraded to focal on 2020-01-24 (1110 days ago)
affects: | snap (Ubuntu) → snapd (Ubuntu) |
Changed in snapd (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Confirmed |
If globbing is considered a bad idea, can I ask for an error message that is clear that the argument is a singular, specific, name?
Perhaps "No snap named $arg installed" or "That snap isn't installed".
Thanks