Update readme and help prints
This commit is contained in:
parent
17f268d78a
commit
907fb3b8ec
2 changed files with 37 additions and 6 deletions
38
README.md
38
README.md
|
|
@ -22,6 +22,7 @@ Bytenuts has been tested and built on x86-64 and 32-bit ARM Ubuntu 18.
|
|||
- Output history - Use page up/down, home/end, and ctrl + up/down arrow to scroll through the output window
|
||||
- Output logging - Output can be saved to a log file passed in with the `-l` option
|
||||
- Quick commands - Pages of quick commands are loaded from `~/.config/bytenuts/commands[1-10]`
|
||||
- Session resumption - Bytenuts can load the previous instance's commands and serial output
|
||||
|
||||
## Planned Features
|
||||
|
||||
|
|
@ -51,11 +52,34 @@ bytenuts [OPTIONS] <serial path>
|
|||
Configs get loaded from ${HOME}/.bytenuts/config (if file exists)
|
||||
|
||||
OPTIONS
|
||||
=========
|
||||
|
||||
-h: show this help
|
||||
-b <baud>: set a baud rate (default 115200)
|
||||
-l <path>: log all output to the given file
|
||||
-c <path>: load a config from the given path rather than the default
|
||||
-h
|
||||
Show this help.
|
||||
|
||||
-b <baud>
|
||||
Set a baud rate (default 115200).
|
||||
|
||||
-l <path>
|
||||
Log all output to the given file.
|
||||
|
||||
-c <path>
|
||||
Load a config from the given path rather than the default.
|
||||
|
||||
-r|--resume
|
||||
Resume the previous instance of bytenuts.
|
||||
|
||||
--colors=<0|1>
|
||||
Turn 8-bit ANSI colors off/on.
|
||||
|
||||
--echo=<0|1>
|
||||
Turn input echoing off/on.
|
||||
|
||||
--no_crlf=<0|1>
|
||||
Choose to send LF and not CRLF on input.
|
||||
|
||||
--escape=<char>
|
||||
Change the default ctrl+b escape character.
|
||||
```
|
||||
|
||||
## Navigation
|
||||
|
|
@ -76,11 +100,13 @@ There are only three supported configs currently. Each config is defined like `<
|
|||
colors=1
|
||||
echo=0
|
||||
no_crlf=0
|
||||
escape=a
|
||||
```
|
||||
|
||||
- `colors` - enable parsing of 8-bit ANSI color codes
|
||||
- `echo` - echo input to the terminal in app
|
||||
- `no_crlf` - just send a line feed (`\n`) for user input rather than carriage return + line feed (`\r\n`)
|
||||
- `escape` - change what character is used as an escape sequence for commands (e.g. if set to `escape=a`, Bytenuts can be exited with `ctrl+a, q`)
|
||||
|
||||
Bytenuts looks for the configs at `~/.config/bytenuts/config`.
|
||||
|
||||
|
|
@ -116,6 +142,10 @@ Bytenuts will only store the first ten commands for each page, so the first 10 l
|
|||
|
||||
On startup, command page 1 is selected. You can select which command page is currently loaded by doing `ctrl+p, [0-9]` to load the desired page (note that index 0 will correspond to `commands10`).
|
||||
|
||||
## Session Resumption
|
||||
|
||||
Bytenuts caches the current instance's command list and output buffer in `~/.config/bytenuts/inbuf.log` and `~/.config/bytenuts/outbuf.log` respectively. If launched with the `-r` flag, Bytenuts will load in the input and output history from those files. The `outbuf.log` can also serve as a backup log if one forgot to launch with the `-l` flag.
|
||||
|
||||
## Bugs
|
||||
|
||||
Check out known bugs in the [issues tab](https://github.com/cookthebook/bytenuts/issues?q=is%3Aissue+is%3Aopen+label%3Abug).
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"-b <baud>\n Set a baud rate (default 115200).\n\n" \
|
||||
"-l <path>\n Log all output to the given file.\n\n" \
|
||||
"-c <path>\n Load a config from the given path rather than the default.\n\n" \
|
||||
"-r|--resume\n Resume the previous instance of bytenuts.\n\n" \
|
||||
"--colors=<0|1>\n Turn 8-bit ANSI colors off/on.\n\n" \
|
||||
"--echo=<0|1>\n Turn input echoing off/on.\n\n" \
|
||||
"--no_crlf=<0|1>\n Choose to send LF and not CRLF on input.\n\n" \
|
||||
|
|
@ -351,7 +352,7 @@ parse_args(int argc, char **argv)
|
|||
bytenuts.config.escape = argv[i][9];
|
||||
bytenuts.config_overrides[3] = 1;
|
||||
}
|
||||
else if (!strcmp(argv[i], "--resume")) {
|
||||
else if (!strcmp(argv[i], "--resume") || !strcmp(argv[i], "-r")) {
|
||||
bytenuts.resume = 1;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue