Colin Watson wrote:
On Sun, Apr 13, 2003 at 08:04:20PM -0400, Travis Crump wrote:Colin Watson wrote:On Sun, Apr 13, 2003 at 06:11:21PM -0400, Benjamin Rutt wrote:It seems that there is an arbitrary limit on 'dpkg -l': it only seems to output the first 14 characters of any package name.Set COLUMNS to something large, or use dpkg-query with the --showformat option (check its man page).pretzalz@Pretzalz:~$ echo $COLUMNS 145 pretzalz@Pretzalz:~$ dpkg -l <nice wide output> pretzalz@Pretzalz:~$ dpkg -l | less <output squished into 80 columns> pretzalz@Pretzalz:~$ COLUMNS=145 dpkg -l | less <nice wide output>Do you really have to specify COLUMNS every time when using dpkg/less?'export COLUMNS' Cheers,
Okay just for my own edification since I am still mildly confused. I know that I need to export a shell variable that I manually set if I want it to be inherited by a subshell, but I never considered that I would also have to export shell variables that were set for me. So I export COLUMNS, what exactly am I exporting? It seems like I am exporting a pointer to COLUMNS since if I resize the terminal, the new value of COLUMNS is correctly picked up. But at the same time, if I start a new terminal from the terminal where I exported COLUMNS, COLUMNS is still exported, but the new terminal's COLUMNS' value is independent of the old terminal's and it works properly, which isn't consistent with the idea that I am exporting a pointer.
Also, I don't completely understand why 'dpkg -l | less' counts as a subshell, but 'dpkg -l' doesn't.