Dear Maintainer,
Please look at the following output:
% apt search x-window-manager
Sorting... Done
Full Text Search... Done
matchbox-themes-extra/stable,stable 0.3-4 all
extra themes for matchbox-window-manager
matchbox-window-manager/stable 1.2-osso21-2+b1 amd64
window manager for resource-limited systems
xorg/stable,now 1:7.7+19 amd64 [installed,automatic]
X.Org X Window System
% apt-cache search x-window-manager
9wm - X11 window manager inspired by Plan 9's rio
aewm - minimalist window manager for X11
aewm++ - minimal window manager written in C++
afterstep - window manager with the NEXTSTEP look and feel
awesome - highly configurable X window manager
blackbox - Window manager for X
bspwm - Binary space partitioning window manager
[...]
wm2 - small, unconfigurable window manager
wmaker - NeXTSTEP-like window manager for X
wmii - lightweight tabbed and tiled X11 window manager, version 3
xfwm4 - window manager of the Xfce project
xmonad - Lightweight X11 window manager written in Haskell
xorg - X.Org X Window System
amiwm - The Amiga look alike window manager
notion - tiling tabbed window manager designed for keyboard users
% apt-cache search x-window-manager | wc -l
59
There are two issues here:
* [1] The list of packages differ (3 vs 59 packages)
* [2] The output format is not the same (2 lines + empty line vs 1 line per package)
Given that the man page of apt(8) states the following
,----
| The apt(8) commandline is designed as an end-user tool and it may change behavior between
| versions. While it tries not to break backward compatibility this is not guaranteed either if a
| change seems beneficial for interactive use.
|
| All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as
| well. apt(8) just changes the default value of some options (see apt.conf(5) and specifically
| the Binary scope). So you should prefer using these commands (potentially with some additional
| options enabled) in your scripts as they keep backward compatibility as much as possible.
`----
we should be ok with [2] but we should document why the output looks different
and - if possible - how to change the output format.
But shouldn't the package list be the same? Or shouldn't there be a setting to
archive that and shouldn't that be documented?
After browsing the source (together with zeha, thx!), we found how to force apt
search to output in the "traditional" way:
apt -oAPT::Cache::Search::Version=1 search x-window-manager
Thank you for looking into this and please tell us what we can do to help.
Regards from the Debian-BSP, Salzburg :),
- Darsha