8

I see I can go back history of command by using "M-p" in minibuffer. But I want to see all of command I used in minibuffer.

Thanks.

Drew
  • 29,895
  • 7
  • 74
  • 104
Kei Minagawa
  • 4,395
  • 3
  • 25
  • 43

4 Answers4

5

The variable is command-history, not minibuffer-history.

You can use M-x list-command-history. Just customize option list-command-history-max, if you want to see the whole history.

Or look directly at variable command-history using C-h v. But see option history-length, which controls how many commands to keep in command-history.

Drew
  • 29,895
  • 7
  • 74
  • 104
4

It's held in minibuffer-history variable. For a graphical view, use helm-minibuffer-history from helm package.

abo-abo
  • 20,038
  • 3
  • 50
  • 71
  • I entered "minibuffer-history" and then "C-j" in scratch buffer. But it only shows ("7" "8" " " "=>" "%d " "204" "188" "%1d " "1" "777" "wdired"). What is this? – Kei Minagawa Feb 16 '14 at 11:44
  • That's a list of your minibuffer history. Isn't this what you expected? – abo-abo Feb 16 '14 at 11:47
  • Yes, that's not what I expected. It seems that is the history when I entered "C-x r N". I forgot when it was. But I entered more command from then. Where the left go? – Kei Minagawa Feb 16 '14 at 11:55
  • "M-x list-command-history" seems work. But it doesn't show all of history of minibuffer. – Kei Minagawa Feb 16 '14 at 12:12
4

This explains how to repeat the n-th previous command and how to view history:

M-x list-command-history

Display the entire command history, showing all the commands C-x <ESC> <ESC> can repeat, most recent first.

And according to this you can set the maximum length of the minibuffer history:

The variable history-length specifies the maximum length of a minibuffer history list; adding a new element deletes the oldest element if the list gets too long. If the value is t, there is no maximum length.

Community
  • 1
  • 1
kbshimmyo
  • 578
  • 4
  • 13
0

If you use Helm, then it would be:

(define-key minibuffer-local-map (kbd "C-c C-l") 'helm-minibuffer-history)

The equvalent version of selectrum + consult:

(define-key minibuffer-local-map (kbd "C-c C-l") 'consult-history)
azzamsa
  • 1,805
  • 2
  • 20
  • 28