I'm connecting to my Linux boxes (primarily Debian Squeeze) using Putty for Windows. Whenever I run a 'less' command, e.g. on an aptitude search, less truncates the listing to much less than my window size. I've looked to see how I can override this but haven't come up with anything.
What terminal is putty reporting to your linux boxes?
echo $TERM to find out. You might try setting this to xterm-color (can be set in the
putty session configs) for best results. Several character and behavior issues get straightened out when it thinks you have a capable terminal.
Are you sure it's less doing the truncation and not aptitude? I notice that aptitude truncates to 80 columns by default when you redirect its output. Try
aptitude search foo | cat and see if your output is truncated.
When you filter the output of a command, it's debatable whether it's best to truncate at the terminal width, at 80 columns or not at all. In fact the command can't know whether its output is eventually going to the terminal, so truncating to the terminal width is dubious.
You can run
aptitude --disable-columns to make aptitude not truncate at all, but it won't align its output either. If your shell is bash or zsh, you can obtain the terminal width from the
COLUMNS shell variable and pass it to aptitude:
aptitude -w $COLUMNS search foo |less