From 3e17a6d185a0b2983a4f749c4781a09ca246cf9b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 21 Jul 2020 20:47:44 +1000 Subject: [PATCH] Fix command example to use correct syntax Change the example to something that requires going through the shell. --- doc/pages/commands.asciidoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index fb35ff3e..e1106eb9 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -488,9 +488,10 @@ New commands can be defined using the *define-command* command: Using shell expansion allows defining complex commands or accessing Kakoune's state: --------------------------------------------------------- -def " print_selection %{ echo %sh{ ${kak_selection} } }" --------------------------------------------------------- +--------------------------------------------------------------------- +# create a directory for current buffer if it does not exist +define-command mkdir %{ nop %sh{ mkdir -p $(dirname $kak_buffile) } } +--------------------------------------------------------------------- == Aliases