Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Whenever I type in a bash command longer than about half the width of the shell window I'm in, the command breaks like it would if I filled the whole screen

image of problem

  • 3rd command in image - typed a few xs and got the expected result.
  • 4th command - typed a load more xs, and the command broke back to the start as though it had filled the whole line.

I'm connecting through Putty.

I'm running Raspbian (a distro based on Debian)

If I'm not being clear enough please say, it's not easy to explain.

share|improve this question
    
Is that putty your using? –  Secko Aug 1 '12 at 11:28
    
Yes, should have said. –  ACarter Aug 1 '12 at 11:32
    
What is your $PS1 variable? –  Random832 Aug 1 '12 at 14:51
add comment

1 Answer 1

up vote 4 down vote accepted

I think that your tty is reporting the wrong tty size. Try running

pi@raspberrypi$ stty -aF /dev/ttyO0

There you will see how many rows and columns the tty thinks it has. This size should match the size set in putty. You can also change parameters, such as number of columns, using stty. The command would be something like

pi@raspberrypi$ stty -F /dev/ttyO0 cols 80

You can check more parameters at http://unixhelp.ed.ac.uk/CGI/man-cgi?stty

share|improve this answer
    
I am using PuTTY with all my Linux machines, like SCO and Ubuntu, and I just tried what you did @ACarter, and I didn't get any oddity. My PuTTY settings are default. So I am not sure if you might've changed something, or it could be an issue with how it is displaying for Raspbian. –  Kevdog777 Aug 1 '12 at 12:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.