You are not logged in.
Pages: 1
i am running Arch Duke. sometimes i have problem with BASH on it. whenever i type something really long it does not go to the end of the screen, instead the cursor just goes off to the beginning of the line e.g.:
[arnuld@arch ~ $] cp -v songs/rock/Alice_Cooper/* songs/Classic_Rock/Alice_Cooper
if i type that line then in 70% of the cases, the line does not go to the end of the terminal, rather when i reach in the middle of the terminal the cursor there slips off to the very-beginning of the terminal - [arnuld@arch ~$]" - and starts to overwrite things there. when i hit "Enter" then command runs fine but i can't see what command i typed in because the typing starts from the beginning automatically. e.g. it looks like this:
_Cooper@arch ~ $] cp -v songs/rock/Alice_Cooper/* songs/Classic_Rock/Alice
[arnuld@arch ~ $] cp -v songs/rock/Alice_Cooper/* songs/Classic_Rock/Alice_Cooper
compare the two commands. it is because cursor just slipped-off to the beginning and it overwrote the "[arnuld"
this does not happen when my login shell is ZSH. what could be the problem... a BASH bug ?
Offline
I've experienced that problem, too. I'd say that it is indeed a problem of bash. For me, it happens whenever PS1 or PS2 is set to something funky. But I can't really reproduce that all the time. For now, I just do all my bash-work in xfce4-terminal. Does not happen in there for me.
Todays mistakes are tomorrows catastrophes.
Offline
I've experienced that problem, too. I'd say that it is indeed a problem of bash. For me, it happens whenever PS1 or PS2 is set to something funky.
yeah, my PS2 is default and PS1 is this:
PS1="\e[1m\][\e[1;32m\]\u@\h\\e[1;31m\] \W \$\e[0m\]\e[1m\]]\e[0m\] "
But I can't really reproduce that all the time.
i *can* reproduce that most of the times :-(
For now, I just do all my bash-work in xfce4-terminal. Does not happen in there for me.
i no longer use Desktops but i had the same problem in Xfce terminal too. these days i use "wmii"
Offline
Yeah. There you go. Unset your PS1 and see if it keeps happening.
Todays mistakes are tomorrows catastrophes.
Offline
You should surround non-printing characters (color codes, etc) in your prompt string with "\[" and "\]". Otherwise Bash can't calculate how long your prompt is.
Offline
Try also with this in your .bashrc:
shopt -s checkwinsizeOffline
this is how the bashfaq in my sig recommends you and how i set my PS1:
BLUE=`tput setf 1`
GREEN=`tput setf 2`
CYAN=`tput setf 3`
RED=`tput setf 4`
MAGENTA=`tput setf 5`
YELLOW=`tput setf 6`
WHITE=`tput setf 7`
PS1='\[$BLUE\]\u \[$YELLOW\]\w\[$CYAN\] \$\[$WHITE\] '
Makes it a bit more readable and understandable.
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
I need to get in on this bashfaq thingy. *find back post*
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
this is how the bashfaq in my sig recommends you and how i set my PS1:
BLUE=`tput setf 1`
GREEN=`tput setf 2`
CYAN=`tput setf 3`
RED=`tput setf 4`
MAGENTA=`tput setf 5`
YELLOW=`tput setf 6`
WHITE=`tput setf 7`PS1='\[$BLUE\]\u \[$YELLOW\]\w\[$CYAN\] \$\[$WHITE\] '
Makes it a bit more readable and understandable.
great buddy... also thanks for the BASH FAQs :-)
Offline
Pages: 1