Issue 27681: readline: consecutive rl_kill_word do not append (original) (raw)
In readline, "kill" basically means "cut" and "yank", "paste. When killing twice in a row, it tries to group the kills. This can be shown to work with rl_unix_word_rubout; with the default emacs keymap, type:
hello world
Then hit ^W (Control+W, rl_unix_word_rubout) twice, then ^Y (Control+Y, rl_yank). You should get back the two words.
Now, using rl_backward_kill_word (Meta ^H), twice, yanking only puts back the last killed word (here, "hello "). With rl_kill_word (^A for start of line, then ^D), twice, yanking also puts back only the last killed word (here, " world"). The expected behavior is to get back both words (there, "hello world").
The behavior appears in both CPython's REPL (2.7 and 3.5 at least) and in the readline module. Other programs (bash, pypy, irb) that use readline show the expected behavior, as well as zsh (with its own implementation of readline).
Granted, I can not really imagine and issue with a lowest priority.