I was wondering how you could get the equivalent of sudo !! in eshell. I cant tell you the amount of times I have done this forgetting eshell doesn't have this feature built in.

I have looked through the available eshell functions and haven't seen anything that seems promising.

  • M-p C-a sudo RET? – NickD Dec 25 '20 at 20:39
  • yes I am able to make a macro that does the equivalent. Unfortunately it is deeply ingrained in me to just say sudo !! especially because I still use other shell programs that have this feature. – Nicholas Hubbard Dec 25 '20 at 22:41
  • 1
    I poked around the code this morning in search of a solution and found eshell choking at eshell-find-interpreter when trying to pass the sudo !! command under the hood (programmatically). I added a note to my wish list, but didn't see an immediately apparent solution already built-in. – lawlist Dec 26 '20 at 1:42
  • Thanks for looking – Nicholas Hubbard Dec 27 '20 at 13:25

Your Answer

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

Browse other questions tagged or ask your own question.