[Aptitude-devel] Bug#834402: Bug#834402: aptitude: search loses column format when redirected or piped
Axel Beckert
abe at debian.org
Mon Aug 15 19:54:34 UTC 2016
Hi Manuel,
Manuel A. Fernandez Montecelo wrote:
> In the past it was just hardcoded to "80 columns", so your example when
> doing it with and without pipe/redirection will have looked different as
> well -- unless the terminal that you are using is 80-column wide, of
> course. (See attachment, the description is truncated).
Either your examples show something different or not the problem:
> $ aptitude search '~i~n^aptitude'
> i aptitude - terminal-based package manager
> i aptitude-common - architecture independent files for the aptitude package manager
>
> $ aptitude search '~i~n^aptitude' | cat
> i aptitude - terminal-based package manager
> i aptitude-common - architecture independent files for the apt
This definitely looks different here and IIRC also for the original
submitter:
~ → aptitude search '~i~n^aptitude' | cat
i A aptitude - terminal-based package manager
i A aptitude-common - architecture independent files for the aptitude package manager
i A aptitude-doc-en - English manual for aptitude, a terminal-based package manager
In the above example the descriptions are no more aligned while they
are in your examples with the very same command (and for me with
0.6.11-1 on Jessie, too).
It gets even worse if automatically and manually installed packages
are mixed in the output:
~ → aptitude search \~i | head
i A 0ad - Real-time strategy game of ancient warfare
i A 0ad-data - Real-time strategy game of ancient warfare (data files)
i A 0ad-data-common - Real-time strategy game of ancient warfare (common data files)
i 0xffff - Open Free Fiasco Firmware Flasher
i A 2048-qt - mathematics based puzzle game
i A 2ping - Ping utility to determine directional packet loss
i A 9menu - Creates X menus from the shell
i abduco - terminal session manager
i A abe-archive-tools - Packages needed to read exotic archive formats
i A abe-commandline - Metapackage of commandline tools Axel usually installs
Now even the package names are no more aligned.
IMHO this misalignment is what this bug report is about.
And yes, if you add an arbitrary value to -w, the column-based,
aligned layout comes back:
~ → aptitude search -w 80 '~i~n^aptitude' | cat
i A aptitude - terminal-based package manager
i A aptitude-common - architecture independent files for the apt
i A aptitude-doc-en - English manual for aptitude, a terminal-ba
~ → aptitude -w 80 search \~i | head
i A 0ad - Real-time strategy game of ancient warfare
i A 0ad-data - Real-time strategy game of ancient warfare
i A 0ad-data-common - Real-time strategy game of ancient warfare
i 0xffff - Open Free Fiasco Firmware Flasher
i A 2048-qt - mathematics based puzzle game
i A 2ping - Ping utility to determine directional pack
i A 9menu - Creates X menus from the shell
i abduco - terminal session manager
i A abe-archive-tools - Packages needed to read exotic archive for
i A abe-commandline - Metapackage of commandline tools Axel usua
Manuel: I really wonder why your examples looked different than mine
wrt. to aligned columns. Maybe some different options being set via
configuration files?
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