4 ms·
Comment it out (put a # at the front), unless your shell is set to ignore commented lines.
by gnubardt 15y ago
Comment it out (put a # at the front), unless your shell is set to ignore commented lines.
- montecarl 15y agoThis works great! There is even a shortcut: M-#
- lukeschlather 15y agoYou said copy-paste - are you using the OS copy-paste or readline's kill ring? C-a C-k is pretty fast, and then can be retrieved with C-y.
- montecarl 15y agoThis is another great solution. As a vim user I haven't much looked into the emacs keybindings in readline. I'll have to read up. Also the terminology was a little confusing. I didn't realize that killing a line was the same as "cutting".
- lukeschlather 15y agoYeah, and of course this does mean you have to be a little careful with M-backspace (backward-kill-word in Emacs), since it will change your kill ring. But on other hand M-backspace can be useful too if you want to get just part of a line, you can move the cursor to where you want, then M-backspace through words to grab it - if you do M-backspace repeatedly the entire string is pulled into the kill ring until you stop pressing M-BS.