News for hackers. Stuff that matters.
Re:Zsh Tricks to Blow Your Mind by akavel on Thursday February 18, 2021 @03:44AM (#26177458)
7. in bash, I use the: [Esc], [#] combo, equivalent to: [Alt]-[Shift]-[3] (a.k.a.: "M-#" in the official docs).

This is a shortcut which basically prefixes the current line with '#' comment character and then simulates hitting Enter (pushing the commented-out line into history buffer).

Re:Zsh Tricks to Blow Your Mind by mkl on Thursday February 18, 2021 @04:05AM (#26177589)
And then the inverse operation, uncommenting and running, is "M-3 M-#" (any number will do, but 3 is on the same key as #).