You are not logged in.

#1 2008-07-28 12:33:12

BabyDoc
Member
Registered: 2008-03-20
Posts: 76

urxvt problem

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:
problem.png

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

#2 2008-07-28 15:26:36

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: urxvt problem

BabyDoc wrote:

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

#3 2008-07-28 15:26:58

Oxyd
Member
From: Czech Republic
Registered: 2008-01-17
Posts: 167

Re: urxvt problem

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

#4 2008-07-28 17:06:20

BabyDoc
Member
Registered: 2008-03-20
Posts: 76

Re: urxvt problem

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

#5 2008-07-28 17:10:43

Oxyd
Member
From: Czech Republic
Registered: 2008-01-17
Posts: 167

Re: urxvt problem

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

#6 2008-07-28 17:18:54

BabyDoc
Member
Registered: 2008-03-20
Posts: 76

Re: urxvt problem

That solved it. Thank you very much Oxyd for the quick help.

Offline

Board footer

Powered by FluxBB