Next: , Previous: , Up: Interface Concepts   [Contents][Index]


4.3 Transient Commands

Many Magit commands are implemented as transient commands. First the user invokes a prefix command, which causes its infix arguments and suffix commands to be displayed in the echo area. The user then optionally sets some infix arguments and finally invokes one of the suffix commands.

This is implemented in the library transient. Earlier Magit releases used the package magit-popup and even earlier versions library magit-key-mode.

Transient is documented in (transient)Top.

C-x M-g (magit-dispatch)
C-c g (magit-dispatch)

This transient prefix command binds most of Magit’s other prefix commands as suffix commands and displays them in a temporary buffer until one of them is invoked. Invoking such a sub-prefix causes the suffixes of that command to be bound and displayed instead of those of magit-dispatch.

This command is also, or especially, useful outside Magit buffers, so Magit by default binds it to C-c M-g in the global keymap. C-c g would be a better binding, but we cannot use that by default, because that key sequence is reserved for the user. See Global Bindings to learn more default and recommended key bindings.