You are not logged in.
I have an odd problem with my CLI input. If I need to type a long command, the screen is obviously not big enough. But instead of skipping to the next line, it overwrites the line I was writing in. Annoying, to say the least. The weird part is, if I continue typing then till the end of the screen, then it does skip to a next line. But never the first time around. Has anyone else experienced this? I'm hoping someone can help me, this is so frustrating.
Last edited by HyperBaton (2008-12-28 19:12:54)
Offline
Err what term you using? you may have a problem with your prompt.....
Last edited by Mr Green (2008-12-27 20:46:05)
Mr Green
Offline
Damn, I'm a pretty experienced linux user, but not when it comes to this type of stuff. What exactly do you mean by term? You mean bash? If so, that's what I'm using.
Offline
which shell would be helpful too, but he's refering to the terminal emulator you're using (xterm, urxvt, konsole, gnome-terminal, terminal, etc)
Offline
Or does it happen on a tty ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Ah, I'm working in the 'real deal' at the moment heh. This is a headless server that I usually access via PuTTy, but I had to do a lot of maintenance so I put in a videocard and hooked up a monitor. So I'm just working in a plain old 640x480 full screen terminal. A virtual console is what it's called I suppose?
Offline
Or does it happen on a tty ?
Yes, that's it I think
By the way, I have had this problem as well when being logged in via SSH (PuTTy), but I did not expect to have this problem in a tty.
Offline
I think I remember seeing a bunch of people having this problem because of a messed up PS1. Did you play with it?
Edit: I meant: with PS1
Last edited by string (2008-12-28 09:28:49)
Offline
So did you play with your, er, PS1 ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
moljac024: You're like one of my favorite mythological creatures on this forum -- and I has a secret (I'm still pondering on whether to reveal it to you or nots) -- ok. check your email, kthnx.
Last edited by string (2008-12-28 10:11:32)
Offline
So did you play with your, er, PS1 ?
I think I did yes, I'll post it here.
PS1='\h:\W \e[0;31m\$\e[m '
It's been a while since I made that prompt, don't really know much about it anymore.
Offline
I can say that colour codes (i.e. "\e[0;31m\") play a big role in making your prompt line shorter... That's one of the reasons why I switched to zsh: now I can customise my prompt and type very long lines with no problem at the same time.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Indeed, change your PS1 to this:
PS1="\h:\W \[\e[0;31m\]\$\[\e[0m\] "
Personally I don't use colors in my PS1 (in fact I have USECOLOR="no" in /etc/rc.conf, amongst other things). I like my PS1 simple and sweet. It used to be just "\w > " for regular users (and "\w # " for root) but since having multiple SSH sessions and not being able to tell right away what commands I'm giving to which host .. I changed stuff to: "\u@\h:\w$ ".
Last edited by string (2008-12-28 14:17:27)
Offline
Changing it to "\u@\h:\w$ " seems to have done the trick yes! Thanks. But I still don't really know why to be honest. Bash doesn't like colors?
Offline
You see, if you read my previous post carefully, I gave you some advice on changing your PS1 to "\h:\W \[\e[0;31m\]\$\[\e[0m\] ". This will look exactly like your previous prompt (coloury and what not) yet not have the skippy problem. Bash loves colours, it simply hates badly crafted PS1 variables (which is what you had .. and which is what I provided the correct version of).
Offline
Ah thanks string, I didn't know you could do that. I just assumed that bash didn't like colours...
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Yes, that works as well! Sweet. I copied it wrong the first time so it didn't quite work (which is why I just grabbed the other PS1 you posted), but I've copied it correctly now and it works indeed. Very helpful topic, should save some other people the trouble I hope.
Offline
Well, similar thread: http://bbs.archlinux.org/viewtopic.php?id=60900
Offline
Searched but did not find I'm afraid :S
But it appears you are the jedi master of PS1 though
Offline