From fe3aeacd3466beba2c9e777e02d4dc70e0ba3a2b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 27 Feb 2026 17:01:14 +0200 Subject: doc: nit --- config_cmd.h.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'config_cmd.h.in') 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(":"), -- cgit v1.2.3