In sh-mode in Emacs, I was looking for a way to execute a shell script in the current buffer directly like the C-c C-c in Python-mode. Using M-! is really tiring. Any amount of googling doesn't help. Is this possible?
M-|
is shell-command-on-region
so if you want to execute the whole buffer, C-x h M-|
or you can rebind to something more convenient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With