In Vim I could retrieve past commands by typing :<first-letter-of-command>↑ . If my Vim command history is:-
colorscheme +
source %
shell
set spell
colorscheme?
bp
term
Typing :s↑ directly shows me the command set spell.
How can I achieve this in Emacs? I already have the line (savehist-mode 1) in my init.el but pressing M-x <first-letter-of-command>↑ does not work. I am using Emacs 25.3.1 on Windows 10.
Edit: My question is not a duplicate of this suggested question. My question is about accessing past commands based on the first letter of the command. For instance, pressing M - x b followed by the up arrow should take me to the most recent command beginning with the letter 'b'. The suggested question is about going through the command history one-by-one without using the arrow keys.