[Aptitude-devel] Bug#834402: Bug#834402: aptitude: search loses column format when redirected or piped

Axel Beckert abe at debian.org
Mon Aug 15 10:59:25 UTC 2016


Control: tag -1 + confirmed

Hi Javier,

Javier Cantero wrote:
> Compare this:
> 
> 	$  aptitude search "~i aptitude"
> 	i   aptitude                                                    0.8.3-1        - gestor de paquetes basado en terminal
> 	i A aptitude-common                                             0.8.3-1        - architecture independent files for the aptitude package manager
> 
> with the same output piped through `less`:
> 
> 	$  aptitude search "~i aptitude" | less
> 	i  aptitude 0.8.3-1 - gestor de paquetes basado en terminal
> 	i A aptitude-common 0.8.3-1 - architecture independent files for the aptitude package manager
> 
> The same happens if the output is redirected to a file:
> 
> 	$  aptitude search "~i aptitude" > kk.txt
> 	$  cat kk.txt 
> 	i  aptitude 0.8.3-1 - gestor de paquetes basado en terminal
> 	i A aptitude-common 0.8.3-1 - architecture independent files for the aptitude package manager

Indeed. This looks like a regression from the version in Debian Jessie.

> I've already read the discussion in #815690. but the thing is: piping to
> more/less is a very common usage of aptitude search (since the lists of
> packages tend to be very long), not just a special case for automatic
> processing of the output. It's really annoying to have to remember to add
> an arbitrary[*] width using `-w` in every `aptitude search ... | less`,
> especially when it's a significant deviation from previous behaviour.

I agree here, but I'm still not sure what's the best way to handle
this case.

		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