diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2026-02-27 17:01:14 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2026-02-27 17:01:14 +0200 |
| commit | fe3aeacd3466beba2c9e777e02d4dc70e0ba3a2b (patch) | |
| tree | 9334bf9f3c662feabb6affe95e6c2ac394b0e8ef /config_cmd.h.in | |
| parent | 4b3105d47a0a5fd1e208d06409b53178099b346a (diff) | |
doc: nit
Diffstat (limited to 'config_cmd.h.in')
| -rw-r--r-- | config_cmd.h.in | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/config_cmd.h.in b/config_cmd.h.in index bd12f0e..e1f5904 100644 --- a/config_cmd.h.in +++ b/config_cmd.h.in @@ -1,8 +1,8 @@ // // DFM - Dylan's File Manager - Configuration file. // -// Commands can be created using the FM_CMD macro which declares a function and -// fills in a struct fm_cmd. +// Commands can be created using the FM_CMD macro which declares a function +// that holds a struct fm_cmd and calls fm_cmd(). // // struct fm_cmd { // cut prompt; // Prompt text. @@ -26,6 +26,18 @@ // CMD_EXEC_MARK = Skip interactive prompt only if marks exist.. // CMD_EXEC_ROOT = Skip interactive prompt even if root. // +// If the FM_CMD system is too limiting you can define your own functions and +// bind them to keys. The same function signature is used in navigation and +// input modes. +// +// static void +// my_custom_fn(struct fm *p) +// { +// // Go wild. +// } +// +// Refer to dfm.c for more information. +// FM_CMD(cmd_exec, .prompt = CUT(":"), |