Function: Electric-command-history-redo-expression

Edit current history line in minibuffer and execute result.
With prefix arg NOCONFIRM, execute current line as-is without editing.

(fn &optional NOCONFIRM)