Bug#92263: dpkg --list truncates package names?
Darabos Edvárd Konrád <nil@hippy.csoma.elte.hu> wrote:
> Hi!
>
> dpkg-query has the very same problem, (redirected output is 80
> characters wide). The value of the COLUMNS variable _does nothing_ when
> you redirect the output, the result will be still 80 characters wide.
[...]
> Additionally: The value of the COLUMNS does nothing (again!!!). The dpkg
> program queries the width of the screen in other ways (don't know how).
> Try it! Manipulate COLUMNS, and run dpkg -l, it will be always as wide as
> the terminal, not the value of COLUMNS.
[...]
> $ dpkg -l
> $ dpkg -l | cat
> $ COLUMNS=120
> $ dpkg -l
> $ dpkg -l | cat
You don't understand the difference between a shell variable and an
environment variable. The COLUMNS variable you set in the quoted shell
session is only available to the shell. dpkg has no way to see it.
Try:
COLUMNS=200 dpkg -l | less
COLUMNS=200 dpkg-query -l | less
Or use export/setenv, depending on your shell (man `basename "$SHELL"`
will probably work).
--
Florent
Reply to: