You are not logged in.
Pages: 1
Hello everyone
I have been a happy Arch user for some time now, but there is still something irritating me. I use urxvt as my terminal, but when I type in commands longer then the width of the current terminal window it overwrites the beginning of my current line.
So instead of going to the next line when I reach the border of my window the cursor goes back to the start of the current line and wipes out whatever what stood there. The commands are executed correctly so it's really only a visual problem.
I am using the awesome wm.
Because a picture says more then 1000 words:
My Xdefaults:
#
# ~/.Xdefaults
#
# urxvt config
urxvt*scrollBar: false
urxvt*loginShell: true
urxvt*transparent: true
urxvt*shading: 30
urxvt*tintColor: #FFFFFF
urxvt*inheritPixmap: true
urxvt*borderLess: true
urxvt*background: #1C1C1C
urxvt*foreground: #B4B4B4
urxvt*font: xft:Terminus:pixelsize=12
urxvt*metaSendsEscape: true
urxvt*modifier: alt
# launch urls from urxvt
urxvt*urlauncher: firefox
urxvt*perl-ext-common: matcher
urxvt*matcher.button: 1
# xft config
Xft.dpi: 80
If anyone would know a solution to this or point me in the right direction it would be very much appreciated.
BabyDoc
Offline
when I type in commands longer then the width of the current terminal window it overwrites the beginning of my current line.
A. Use a different shell such as zsh (I highly recommend it).
B. Manually insert escaped carriage returns like so…
echo foo\
bar
Offline
I suppose this is more matter of your shell settings than your terminal. URxvt doesn't do that on me and it never has. Can you show your ~/.bashrc (~/.zshrc or ~/.whatevershellrc)? Wrong PS1 setting can sometimes cause some strange behaviour.
Offline
My bashrc:
#
# ~/.bashrc
#
alias ls='ls --color=auto'
# prompt
#PS1='[\u@\h \W]\$ '
PS1='\e[1;35m\][\t][\u] \[\e[0;32m\] \W \e[1;37m\]$ '
# bash (sudo) completion
complete -cf sudo
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# extract
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.ZIP) unzip $1 ;;
*.Z) uncompress $1;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# alias
# pacman
alias pacup='sudo pacman-color -Syu'
alias pacin='sudo pacman-color -S'
alias pacout='sudo pacman-color -Rs'
alias pacclean='sudo pacman-color -Scc'
alias pacs='pacman-color -Ss'
# yaourt
alias yaup='yaourt -Syu --aur'
alias yain='yaourt -S'
alias yas='yaourt -Ss'
# reboot/shutdown
alias reboot='sudo reboot'
alias shutdown='sudo shutdown -Ph now'
# environment variables
export EDITOR="vim"
Offline
PS1='\e[1;35m\][\t][\u] \[\e[0;32m\] \W \e[1;37m\]$ '
This seems likely to be the cause of your problems. You should enclose sequences of non-printable characters within \[ and \] -- you seem to include the terminating "\]"s, but not always begin the sequence with "\[". Try changing it into
PS1='\[\e[1;35m\][\t][\u] \[\e[0;32m\] \W \[\e[1;37m\]$ '
.
Offline
That solved it. Thank you very much Oxyd for the quick help.
Offline
Pages: 1