Let us say in the interactive subshell I run these commands:

  • command_a
  • command-b
  • command_c
  • ...
  • command_z

I type M-p to go back to command_z.
But how can I scroll back the history of commands until I land on command_j, for example?


For cycling the command history in Shell use: M-n and M-p

have a look at Gnu Emacs Manual for the Shell ring

  • I landed on that page before asking, but I guess I am not smart :) Thank you for the help. – Billal Begueradj Apr 16 '18 at 5:29
  • 1
    emacs documentation requires getting used to. It is very minimal yet concise. You are welcome! – manandearth Apr 16 '18 at 16:23

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.