summaryrefslogtreecommitdiffstats
path: root/documentation.md
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2019-03-03 18:49:15 +0100
committerCanop <cano.petrole@gmail.com>2019-03-03 18:49:15 +0100
commit345a5a8d33370766d51e75bc45f483997ad8421b (patch)
tree01f5388bfd6d78046af2c2c5120ed06a5bd98637 /documentation.md
parent32b19669bcf6570bf8f0fbd80da1c014d364bb27 (diff)
verb conf documentation a little less outdated
Diffstat (limited to 'documentation.md')
-rw-r--r--documentation.md26
1 files changed, 17 insertions, 9 deletions
diff --git a/documentation.md b/documentation.md
index 5c347c4..48c58f6 100644
--- a/documentation.md
+++ b/documentation.md
@@ -35,22 +35,30 @@ Flags are displayed at the bottom right, showing the settings regarding hidden f
## Verbs
-The definition of a verb (which you'll find in the configuration file, see below) is made of three parts:
+The definition of a verb (which you'll find in the configuration file, see below) contains several parts.
-* an invocation string, which you should make short if you want to use on
-* a name, which is used for inline help
-* the execution
+Two of them aren't optional:
+
+* an invocation string, defining what you type to call the function
+* the execution, defining what it does
For example this one:
[[verbs]]
- name = "edit"
- invocation = "e"
- execution = "/usr/bin/nvim {file}"
+ invocation = "p"
+ execution = ":parent"
+
+Or this one:
+
+ [[verbs]]
+ invocation = "create {subpath}"
+ execution = "/usr/bin/nvim {directory}/{subpath}"
-This means that typing `:e` then `<enter>` opens the selected file in neovim (when you're in the help screen, the selected file is broot's configuration file).
+We see here two types of execution:
+* the first one, starting with `:`, calls a builtin function
+* the second one calls an external program (nvim)
-(this is a part of the default configuration, and probably the first verb you should change for your personal setup)
+This means that typing `:create` then a name, then `<enter>` opens the selected new file in neovim (when you're in the help screen, the selected file is broot's configuration file).
If you want your command to be executed from the parent shell, add this to the verb definition: