You are not logged in.

#1 2009-04-23 23:33:13

Marenz
Member
Registered: 2008-06-22
Posts: 48

urxvt and zsh [resolved]

Hey there,

I recently switched to urxvt (because shift+W in the neo-keyboard layout resulted in pasting stuff in xterm).
Now, when I log on to my server, controlkeys like, delete, arrows and similar wont get rendered correctly.
An example what this means:

writing 123<delete><delete><delete>abc result in
123   abc
but the command being executed is as desired
abc

This was under zsh -f (which I think means, no config was loaded?)


On my local system this problem is not existant.
It works again when i try it in xterm or when i start bash instead of zsh.

Any suggestions?

--Marenz

Last edited by Marenz (2009-05-20 09:59:36)

Offline

#2 2009-04-24 05:53:47

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: urxvt and zsh [resolved]

I had a similar problem with home/end/insert/delete, which was solved by adding these rules to my .zshrc:

##Set some keybindings
###############################################
typeset -g -A key
bindkey '^?' backward-delete-char
bindkey '^[[7~' beginning-of-line
bindkey '^[[5~' up-line-or-history
bindkey '^[[3~' delete-char
bindkey '^[[8~' end-of-line
bindkey '^[[6~' down-line-or-history
bindkey '^[[A' up-line-or-search
bindkey '^[[D' backward-char
bindkey '^[[B' down-line-or-search
bindkey '^[[C' forward-char 
bindkey '^[[2~' overwrite-mode
#################################################

(Add it towards the end of the file).

The symbols in the '' are found by hitting control+v (this may only work for urxvt) and then the desired key (so '^?' is found by hitting control+v then backspace, and it will return ^?, which you then add to the keybindings).

Also, backward-char and forward-char, along with the up and down lines, are the arrow keys.

Last edited by lswest (2009-04-24 05:55:43)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#3 2009-04-24 10:36:28

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: urxvt and zsh [resolved]

Thanks for the reply. Unfortunly you suggestion didn't fix my problem sad
I may should add that this problem happens when I am ssh-ing into my server.

--Marenz

Offline

#4 2009-04-24 15:30:40

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: urxvt and zsh [resolved]

which zshrc did you change? (if you use zsh on the server that is).

Otherwise I'm not sure where the problem could lie.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#5 2009-04-24 15:32:04

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: urxvt and zsh [resolved]

the ~/.zshrc file

--Marenz

Offline

#6 2009-04-25 12:34:03

chimpyw
Member
Registered: 2007-02-14
Posts: 21

Re: urxvt and zsh [resolved]

Same problem here, when starting urxvt sometimes it will do as you described like pressing tab will actually insert a tab but the command will be completed when actually pressing enter.

I just press enter everytime I start urxvt now just to be sure sad

Offline

#7 2009-04-27 13:34:00

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: urxvt and zsh [resolved]

Marenz wrote:

the ~/.zshrc file

--Marenz

What shell are you using on the server?  If it's also zsh, I'd try adding the keybindings there as well.

@chimpyw:
I have the same problem, but for me if you hit tab even if it doesn't display it still auto-completes when you hit enter, so I haven't bothered figure out a fix for that.  If you find an answer please let me know.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#8 2009-04-27 13:37:41

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: urxvt and zsh [resolved]

The problem is only on the server, not local, of course its zsh there, thats what the whole topic is about. I've put the keybindings only there, as local everything works

--Marenz

Offline

#9 2009-04-27 14:26:21

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and zsh [resolved]

chimpyw wrote:

Same problem here, when starting urxvt sometimes it will do as you described like pressing tab will actually insert a tab but the command will be completed when actually pressing enter.

I just press enter everytime I start urxvt now just to be sure sad

I have this same issue and have had the issue for quite some time.  I wonder if it's a terminfo problem.

Last edited by rson451 (2009-04-27 14:27:05)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#10 2009-04-27 17:33:57

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: urxvt and zsh [resolved]

Marenz wrote:

The problem is only on the server, not local, of course its zsh there, thats what the whole topic is about. I've put the keybindings only there, as local everything works

--Marenz

The way I understood it was that you had applied the keybindings to the .zshrc on your local host, my misunderstanding, sorry.  Did you source the .zshrc file or reboot after making changes?  I think it's required for the shell to load the new keybindings.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#11 2009-04-27 17:44:03

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: urxvt and zsh [resolved]

I just executed another zsh instance after the changes. Usually they are applied after that. I just tried sourcing it, made no change.

--Marenz

Offline

#12 2009-04-27 19:20:09

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: urxvt and zsh [resolved]

Marenz wrote:

I just executed another zsh instance after the changes. Usually they are applied after that. I just tried sourcing it, made no change.

--Marenz

Then I'm out of ideas, sorry.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#13 2009-05-05 11:40:26

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and zsh [resolved]

Anymore thoughts on this?


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#14 2009-05-05 13:26:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: urxvt and zsh [resolved]

If it's only happening on the first line in a new shell, then it is a known bug. If it's happening all the time, then it sounds like something is really buggy on your box hmm
Edit: if it's only happening on the first line, simply pressing enter once will "solve" it.

Last edited by Mr.Elendig (2009-05-05 13:27:41)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#15 2009-05-05 13:57:56

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and zsh [resolved]

Known bug is what I wanted to hear.  Thanks IRC god.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#16 2009-05-05 15:45:07

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: urxvt and zsh [resolved]

rson451 wrote:

Known bug is what I wanted to hear.  Thanks IRC god.

Havn't seen anyone come up with a real fix yet, and the problem have been around for ages hmm


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#17 2009-05-05 19:56:59

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: urxvt and zsh [resolved]

I seem to remember this bug only showing up after I had set up a custom prompt, and assumed precmd or preexec was responsible, but it was probably happening before and I just hadn't noticed it.

Offline

#18 2009-05-05 20:11:38

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: urxvt and zsh [resolved]

HashBox wrote:

I seem to remember this bug only showing up after I had set up a custom prompt, and assumed precmd or preexec was responsible, but it was probably happening before and I just hadn't noticed it.

For me it only seems to be happening since I started using a multi-line script, before I was merely using the right and left prompts, without issue.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#19 2009-05-06 06:42:03

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: urxvt and zsh [resolved]

lswest wrote:
HashBox wrote:

I seem to remember this bug only showing up after I had set up a custom prompt, and assumed precmd or preexec was responsible, but it was probably happening before and I just hadn't noticed it.

For me it only seems to be happening since I started using a multi-line script, before I was merely using the right and left prompts, without issue.

Actually you're right this would've been when it appeared for me also.

Offline

#20 2009-05-06 12:35:16

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and zsh [resolved]

I'm using a standard User@Host PWD$ prompt and I get this, however I do have some tricky stuff in precmd and preexec.  I'll play with it some tonight and see if i can work it out.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#21 2009-05-20 09:59:04

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: urxvt and zsh [resolved]

I finally got it fixed! s4msungs tip to try aur/rxvt-unicode-256color did it!
Using the aur package made all problems disappear.

I guess this must be a bug in the arch package then...

--Marenz

Offline

#22 2009-05-20 11:26:50

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: urxvt and zsh [resolved]

I wouldn't be so quick to say that, I've been running rxvt-unicode-256color with afterimage support and as far as I can see the problem still exists, can anyone else confirm either way?

Offline

#23 2009-05-20 12:29:16

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and zsh [resolved]

I too use aur/rxvt-unicode-256color and the problem exists for me.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#24 2009-06-05 07:23:48

rephorm
Member
Registered: 2009-06-05
Posts: 3

Re: urxvt and zsh [resolved]

Try setting your TERM to xterm instead of rxvt

(e.g. add "Mrxvt.termName: xterm" to your ~/.mrxvtrc)

See the following for more:
http://www.mail-archive.com/materm-deve … 00071.html

Last edited by rephorm (2009-06-05 07:24:10)

Offline

#25 2010-03-30 21:52:55

Schnouki
Member
From: Nancy, France
Registered: 2007-10-28
Posts: 21
Website

Re: urxvt and zsh [resolved]

rephorm wrote:

Try setting your TERM to xterm instead of rxvt

(e.g. add "Mrxvt.termName: xterm" to your ~/.mrxvtrc)

Many thanks for this tip! It works just fine for me with urxvt.


There's no place like ::1

Offline

Board footer

Powered by FluxBB