2

I'm reading the bash man page and memorizing the keyboard shortcuts. C-x rubout is bound to backward kill line, and C-u is bound to unix line discard, but the descriptions for these commands look the same. What is the difference between these commands?

0

Here's what I found:

backward-kill-line (C-x Rubout)
    Kill backward to the beginning of the line.

unix-line-discard (C-u)
    Kill backward from the cursor to the beginning of the current line. 

https://ftp.gnu.org/old-gnu/Manuals/bash-2.05a/html_node/bashref_97.html

       backward-kill-line (C-x Rubout)
              Kill backward to the beginning of the line.
       unix-line-discard (C-u)
              Kill backward from point to the beginning of the line.  The
              killed text is saved on the kill-ring.

https://man7.org/linux/man-pages/man3/readline.3.html#EDITING_COMMANDS

Seems that unix-line-discard saves it on the keyring, while backward-kill-line doesn't - however I couldn't find out how to verify that and the Emacs Wiki says that backward-kill-line also appends to the jeyring

Other use of these terms: https://github.com/junegunn/fzf/pull/489/files#diff-1fabf11f4aca2d62eb64290f66d25217R180

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.