Skip to content

Commit 7062970

Browse files
committed
keybindings help
1 parent e0bbbe3 commit 7062970

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ Configuring cmdtree will be easy (not yet implemented, still WIP):
2020

2121
Configuring cmdtree is currently not so easy, but you just need to tweak
2222
[cfg.def.h](cfg.def.h) to your liking before building.
23+
24+
25+
key bindings
26+
------------
27+
28+
```
29+
ESC quit
30+
Backspace go up one level
31+
```

cfg.def.h

+5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,16 @@ static struct scheme schemes[SchemeLast] = {
5555
.children = (cs), \
5656
},
5757

58+
static struct command test_commands[] = {
59+
DEFCMD("t", "test command", "echo ok")
60+
};
61+
5862
static struct command browser_commands[] = {
5963
DEFCMD("s", "chrome scaled", "chrome")
6064
DEFCMD("c", "chromium", "chromium")
6165
DEFCMD("f", "firefox", "firefox")
6266
DEFCMD("k", "kill chrome", "pkill --oldest chromium")
67+
DEFPREFIX("t", "test nested prefix", test_commands)
6368
};
6469

6570
static struct command commands[] = {

0 commit comments

Comments
 (0)