[Aptitude-devel] feature request: show version of pkg in search result
Axel Beckert
abe at debian.org
Fri Jan 23 10:16:50 GMT 2015
Hi,
U.Mutlu wrote:
> is it possible to output also the version (and architecture) of a
> pkg when doing a search?
Yes.
> For example this command shows the version of the installed pkg:
>
> # dpkg -l | grep -i lxc
> ii lxc 1:1.0.6-6 amd64 Linux Containers userspace tools
>
> But aptitude search unfortunately doesn't show any version number:
>
> # aptitude -V -t testing search lxc
> i lxc - Linux Containers userspace tools
>
> Or did I miss a program switch?
>From the man page:
-F <format>, --display-format <format>
Specify the format which should be used to display output
from the search and versions commands. For instance,
passing “%p %V %v” for <format> will display a package's
name, followed by its currently installed version and its
available version (see the section “Customizing how
packages are displayed” in the aptitude reference manual
for more information).
The command-line option --disable-columns is often useful in
combination with -F.
For search, this corresponds to the configuration option
Aptitude::CmdLine::Package-Display-Format; for versions,
this corresponds to the configuration option
Aptitude::CmdLine::Version-Display-Format.
To take your example with the example from the man page:
$ aptitude search -F '%p %V %v' lxc
libclxclient-dev 3.9.0-2 <none>
libclxclient3 3.9.0-2 <none>
lxc 1:1.0.6-6 1:1.0.6-6
lxc-dbg 1:1.0.6-6 <none>
lxctl 0.3.1+debian-3 0.3.1+debian-3
nova-compute-lxc 2014.1.3-9 <none>
You can get the full aptitude manual in English at
https://aptitude.alioth.debian.org/doc/en/. Other languages are
available at https://aptitude.alioth.debian.org/doc/.
Regards, Axel
--
,''`. | Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
More information about the Aptitude-devel
mailing list