Comment 1 for bug 1639542

Revision history for this message
Alex George (xzeroknight) wrote :

I ran into the exact same issue; I assume you're using Zsh? Add this somewhere to your shell configuration:

# Make Shift+Enter and Shift+Space just emit Enter and Space respectively in
# ZLE, otherwise their corresponding escape codes are taken as actual input
bindkey -s '^[[13;2u' '^M'
bindkey -s '^[[32;2u' ' '

The reason the command line is "deleted" is because ZLE interprets the escape sequence sent by Shift+Space as actual input, thus it thinks you pressed Esc, which puts it into Vi "normal" mode. So now the rest of the escape sequence becomes a string of Vi commands, so ZLE thinks that you typed a '[' character, which probably does nothing, followed by '32;', which attempts to repeat the last 'f/F/t/T' command 32 times, and finally interprets '2u' as the 'undo' command, which in this case undoes the last 'insert' operation, which was the command line that you initially started to type out. This is why Shift+Space "deletes" your command line.

Let me know if this alleviated your problem. Cheers.