[issue445] zsh: pasting character sequence ",." onto empty commandline.

Gus Tavares bts at bts.grml.org
Mon Apr 7 11:42:43 CEST 2008


New submission from Gus Tavares <skinnerrobot at gmail.com>:

Using your mouse, please copy and paste onto your zsh commandline the following
line:

echo '#a,.b'


The result is:

#ab


Yes, even before pressing Return, it won't even copy onto the command line properly.


In fact, type very quickly the character sequence (within the quotes) ",.".


Nothing, right?


Note that this also happens even in an ordinary terminal, not just in an xterm.
Also, this only happens in zsh, not in bash.


Now, please type (do not cut and paste with your mouse) the following line:

echo '#a,.b' | xclip


Then click your middle button or wheel on the commandline to paste what is in xclip.


The result is again:

#ab


Now please type:

cat > tmp.txt

and using your mouse copy and paste:

,.

[you will see that it pastes properly] and then type Return and ^D.


Then enter:

cat tmp.txt

and the result is OK.



It would seem that it is only when pasting directly onto the ( empty ? )
commandline of zsh that the character sequence ",." is eliminated. Even when
using xclip, any ",." is eliminated when pasting directly onto the zsh
commandline. Again, this doesn't occur within bash.



I checked the Web and the best I could come up with is from the site:

http://www.mkssoftware.com/docs/man1/xterm.1.asp

which states:

<quote>
sunKeyboard (class SunKeyboard)

 Specifies whether or not Sun/PC keyboard layout should be assumed rather than
DEC VT220. This causes the keypad + to be mapped to ,. and CTRL F1-F12 to
F11-F20, depending on the setting of the ctrlFKeys resource. so xterm emulates a
DEC VT220 more accurately. Otherwise (the default, with sunKeyboard set to
false), xterm uses PC-style bindings for the function keys and keypad.
</quote>


What does zsh have against the character sequence ",."?  I've noticed how when
typing the comma, zsh is slow to display it. But why does it only eliminate the
sequence ",." in particular?  For example, copy and paste:

echo '# a,,b a.,b a,:b a,;b a,a a,z a,0 a,9'

and it is OK. Are there other character sequences that get eliminated?

Thank you for your time.

----------
messages: 1275
nosy: SkinnerRobot
priority: wish
status: unread
title: zsh: pasting character sequence ",." onto empty commandline.
topic: zsh

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue445>
_____________________________________



More information about the Bugs-changes mailing list