Update keystroke manual and help

This commit is contained in:
Night Kaly 2024-11-21 15:45:13 +00:00
parent 07aab26f1c
commit 6f976e9ede
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM
3 changed files with 44 additions and 38 deletions

View file

@ -31,18 +31,10 @@ ccc dir
``` ```
``` ```
h: go to parent dir h/left/backspace: go to parent dir
j: scroll down j/down: scroll down
k: scroll up k/up: scroll up
l: go to child dir l/right/enter: go to child dir
left: go to parent dir
down: scroll down
up: scroll up
right: go to child dir
enter: go to child dir/open file
backspace: go to parent dir
o: open file with o: open file with
O: open file with a GUI program detached from file manager O: open file with a GUI program detached from file manager

16
ccc.1
View file

@ -11,18 +11,10 @@ Soft fork of fff in C aiming for size and speed with no dependency, hackable wit
. .
.nf .nf
h: go to parent dir h/left/backspace: go to parent dir
j: scroll down j/down: scroll down
k: scroll up k/up: scroll up
l: go to child dir l/right/enter: go to child dir
left: go to parent dir
down: scroll down
up: scroll up
right: go to child dir
enter: go to child dir/open file
backspace: go to parent dir
o: open file with o: open file with
O: open file with a GUI program detached from file manager O: open file with a GUI program detached from file manager

50
ccc.c
View file

@ -524,19 +524,41 @@ void show_help(void)
{ {
bprintf("\033[2J"); bprintf("\033[2J");
move_cursor(1, 1); move_cursor(1, 1);
bprintf("h: go to parent dir\nj: scroll down\nk: scroll up\n" bprintf(
"l: go to child dir\n\nleft: go to parent dir\ndown: scroll down\n" "h/left/backspace: go to parent dir\n"
"up: scroll up\nright: go to child dir\n\n" "j/down: scroll down\n"
"enter: go to child dir/open file\nbackspace: go to parent dir\n\n" "k/up: scroll up\n"
"gg: go to top\nG: go to bottom\n\nctrl+u: jump up\nctrl+d: jump down\n\n" "l/right/enter: go to child dir\n\n"
"t: go to trash dir\n~: go to home dir\n-: go to previous dir\n" "o: open file with\n"
"z: refresh current dir\n:: go to a directory by typing\nu: sort files\n\n" "O: open file with a GUI program detached from file manager\n\n"
".: toggle hidden files\ni: toggle file details\nX: toggle executable\n\n" "g: go to top\n"
"A: show directory disk usage/block size\n\nf: new file\nn: new dir\n" "G: go to bottom\n\n"
"r: rename\n\nspace: mark file\na: mark all files in directory\nd: trash" "ctrl+u: jump up\n"
"\n\n?: show help\nq: exit with last dir written to file\n" "ctrl+d: jump down\n\n"
"ctrl+c exit without writing last dir" "t: go to trash dir\n"
"\nPress any key to continue" "~: go to home dir\n"
"-: go to previous dir\n"
"z: refresh current dir\n"
":: go to a directory by typing\n\n"
".: toggle hidden files\n"
"A: show directory disk usage/block size\n"
"i: toggle file details\n"
"u: sort files\n"
"x: view file/dir attributes\n"
"e: show history\n"
"y: copy filename to clipboard\n"
"!: open shell in current dir\n\n"
"f: new file\n"
"n: new dir\n"
"r: rename\n"
"X: toggle executable\n\n"
"space: mark file\n"
"a: mark all files in directory\n"
"d: trash\n\n"
"[1-9]: favourites/bookmarks (see customizing)\n\n"
"?: show help\n"
"q: exit with last dir written to file\n"
"ctrl+c exit without writing last dir\n"
); );
wpprintw("Visit https://github.com/night0721/ccc or use 'man ccc' for help"); wpprintw("Visit https://github.com/night0721/ccc or use 'man ccc' for help");
readch(); readch();
@ -1508,7 +1530,7 @@ int get_window_size(int *row, int *col)
*/ */
void bprintf(const char *fmt, ...) void bprintf(const char *fmt, ...)
{ {
char buffer[512]; char buffer[1024];
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);