You are not logged in.

#1 2011-08-23 15:34:15

TheCreeL
Member
Registered: 2011-08-23
Posts: 30

[Solved]Prompt - comand lenght

In these days i played with the .bashrc file to change the prompt in terminals.

Now when i type a long comand, after some character, it doesn't continue in a new line but start again in the same line overwriting the prompt.

How can i fix this ?

Last edited by TheCreeL (2011-08-23 17:11:15)

Offline

#2 2011-08-23 15:53:44

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [Solved]Prompt - comand lenght

Make sure you put \[ and \] around strings of formatting characters in PS1 so bash knows they don't count towards how long the prompt actually is on the screen.

Also, you should turn on the "checkwinsize" option or bash won't notice when you resize the window it's in (setopt -s checkwinsize).

I still see this problem some of the time, but it got much better once I fixed those two things.

Offline

#3 2011-08-23 17:10:55

TheCreeL
Member
Registered: 2011-08-23
Posts: 30

Re: [Solved]Prompt - comand lenght

Thank you very much, that works smile

Offline

Board footer

Powered by FluxBB