Variable: current-minibuffer-command
current-minibuffer-command is a variable defined in keyboard.c.
Value
nil
Documentation
This is like this-command, but bound recursively.
Code running from (for instance) a minibuffer hook can check this variable to see what command invoked the current minibuffer.
Probably introduced at or before Emacs version 28.1.
Source Code
// Defined in /usr/src/emacs/src/keyboard.c
DEFVAR_LISP ("current-minibuffer-command", Vcurrent_minibuffer_command,
doc: /* This is like `this-command', but bound recursively.
Code running from (for instance) a minibuffer hook can check this variable
to see what command invoked the current minibuffer. */);