SyterKit
0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
include
cli
cli_config.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0+ */
2
3
#ifndef __CLI_CONFIG_H__
4
#define __CLI_CONFIG_H__
5
6
#include <uart.h>
7
8
/* ************************************************************************* *
9
* Buffer Sizes for Commandline Editting
10
* ************************************************************************* */
11
/* maximum chars per line, INCLUDEING a traling null char */
12
#define MSH_CMDLINE_CHAR_MAX (300)
13
14
/* maximum argument a commandline can hold, i.e., max of argc value */
15
#define MSH_CMDARGS_MAX (16)
16
17
/* maximum number of history */
18
#define MSH_CMD_HISTORY_MAX (8)
19
20
/* default prompt string. (cmdedit.c) */
21
#define MSH_CMD_PROMPT "SyterKit> "
22
23
/* enable args debug */
24
#define MSH_ARGS_DEBUG (0)
25
26
/* ************************************************************************* *
27
* Keybinds etc
28
* ************************************************************************* */
29
/* keybinds */
30
#define MSH_CTRL_KEY(c) (~0x60 & c)
31
/* the default is emacs flavor
32
Ctrl-H Backspace
33
Ctrl-C Discard line
34
35
Ctrl-F Cursor right
36
Ctrl-B Cursor left
37
Ctrl-A Line head
38
Ctrl-E Line tail
39
Ctrl-D Delete
40
Ctrl-U Kill line
41
42
Ctrl-P Previous history
43
Ctrl-N Next history
44
Ctrl-L Clear screen
45
*/
46
#define MSH_CTRL_KEY_DECODE(c) (0x60 | c)
47
#define MSH_KEYBIND_ENTER '\n'
48
#define MSH_KEYBIND_BACKSPACE MSH_CTRL_KEY('h')
49
#define MSH_KEYBIND_DISCARD MSH_CTRL_KEY('c')
50
#define MSH_KEYBIND_DELETE MSH_CTRL_KEY('d')
51
#define MSH_KEYBIND_KILLLINE MSH_CTRL_KEY('u')
52
#define MSH_KEYBIND_CURRIGHT MSH_CTRL_KEY('f')
53
#define MSH_KEYBIND_CURLEFT MSH_CTRL_KEY('b')
54
#define MSH_KEYBIND_LINEHEAD MSH_CTRL_KEY('a')
55
#define MSH_KEYBIND_LINETAIL MSH_CTRL_KEY('e')
56
#define MSH_KEYBIND_YANK MSH_CTRL_KEY('y')
57
#define MSH_KEYBIND_KILLTAIL MSH_CTRL_KEY('k')
58
#define MSH_KEYBIND_KILLWORD MSH_CTRL_KEY('w')
59
#define MSH_KEYBIND_CLEAR MSH_CTRL_KEY('l')
60
#define MSH_KEYBIND_HISTPREV MSH_CTRL_KEY('p')
61
#define MSH_KEYBIND_HISTNEXT MSH_CTRL_KEY('n')
62
63
/* parse.c */
64
#define MSH_CMD_DQUOTE_CHAR '"' /* double quote */
65
#define MSH_CMD_SQUOTE_CHAR '\'' /* single quote */
66
#define MSH_CMD_ESCAPE_CHAR '\\' /* backslash */
67
#define MSH_CMD_SEP_CHAR ';' /* command separator */
68
#define MSH_CMD_FS_CHAR ' ' /* field separator */
69
70
71
#endif /*__CLI_CONFIG_H__*/
Generated by
1.9.8