Re-format help

This commit is contained in:
Arun Prakash Jana 2017-07-03 09:46:37 +05:30
parent be8e4d8552
commit be8e9d5213
No known key found for this signature in database
GPG Key ID: A75979F35C080412
4 changed files with 106 additions and 101 deletions

View File

@ -133,7 +133,8 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
#### Cmdline options
usage: nnn [-l] [-i] [-p custom_nlay] [-S] [-v] [-h] [PATH]
usage: nnn [-c N] [-e] [-i] [-l] [n]
[-p nlay] [-S] [-v] [-h] [PATH]
The missing terminal file browser for X.
@ -146,7 +147,7 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
-i start in navigate-as-you-type mode
-l start in light mode (fewer details)
-n disable color for directory entries
-p path to custom nlay
-p nlay path to custom nlay
-S start in disk usage analyzer mode
-v show program version and exit
-h show this help and exit
@ -158,14 +159,14 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
```
Key | Function
-+-
Up, k, ^P | Previous entry
Down, j, ^N | Next entry
, k, ^P | Previous entry
, j, ^N | Next entry
PgUp, ^U | Scroll half page up
PgDn, ^D | Scroll half page down
Home, g, ^, ^A | Jump to first entry
End, G, $, ^E | Jump to last entry
Right, Enter, l, ^M | Open file or enter dir
Left, Bksp, h, ^H | Go to parent dir
→, ↵, l, ^M | Open file or enter dir
, Bksp, h, ^H | Go to parent dir
Insert | Toggle navigate-as-you-type mode
~ | Jump to HOME dir
& | Jump to initial dir
@ -187,7 +188,7 @@ Right, Enter, l, ^M | Open file or enter dir
o | Open dir in NNN_DE_FILE_MANAGER
p | Open entry in PAGER (fallback less)
^K | Invoke file path copier
^L, F2 | Force a redraw, exit filter prompt
^L, F2 | Force a redraw, unfilter
? | Toggle help and settings screen
Q | Quit and change directory
q, ^Q | Quit

View File

@ -1,7 +1,4 @@
/* See LICENSE file for copyright and license details. */
#define CWD "cwd: "
#define CURSR " > "
#define EMPTY " "
#define CONTROL(c) ((c) ^ 0x40)
/* Supported actions */

13
nnn.1
View File

@ -6,9 +6,12 @@
.Nd the missing terminal file browser for X
.Sh SYNOPSIS
.Nm
.Op Ar -l
.Op Ar -c N
.Op Ar -e
.Op Ar -i
.Op Ar -p custom_nlay
.Op Ar -l
.Op Ar -n
.Op Ar -p nlay
.Op Ar -S
.Op Ar -v
.Op Ar -h
@ -64,7 +67,7 @@ Show change dir prompt
.It Ic d
Toggle detail view
.It Ic D
Toggle current file details screen
Show current file details screen
.It Ic m
Show concise media info
.It Ic M
@ -86,7 +89,7 @@ Open current entry in PAGER (fallback less)
.It Ic ^K
Invoke file path copier
.It Ic ^L, [F2]
Force a redraw, exit filter prompt
Force a redraw, unfilter
.It Ic \&?
Toggle help and settings screen
.It Ic Q
@ -117,7 +120,7 @@ supports the following options:
.Fl n
disable color for directory entries
.Pp
.Fl "p custom_nlay"
.Fl "p nlay"
path to custom nlay
.Pp
.Fl S

22
nnn.c
View File

@ -104,6 +104,9 @@ disabledbg()
#define TOUPPER(ch) \
(((ch) >= 'a' && (ch) <= 'z') ? ((ch) - 'a' + 'A') : (ch))
#define MAX_CMD_LEN 5120
#define CWD "cwd: "
#define CURSR " > "
#define EMPTY " "
#define CURSYM(flag) (flag ? CURSR : EMPTY)
#define FILTER '/'
#define MAX_BM 10
@ -1463,14 +1466,14 @@ show_help(void)
static char helpstr[] = ("\
Key | Function\n\
-+-\n\
Up, k, ^P | Previous entry\n\
Down, j, ^N | Next entry\n\
, k, ^P | Previous entry\n\
, j, ^N | Next entry\n\
PgUp, ^U | Scroll half page up\n\
PgDn, ^D | Scroll half page down\n\
Home, g, ^, ^A | Jump to first entry\n\
End, G, $, ^E | Jump to last entry\n\
Right, Enter, l, ^M | Open file or enter dir\n\
Left, Bksp, h, ^H | Go to parent dir\n\
, , l, ^M | Open file or enter dir\n\
, Bksp, h, ^H | Go to parent dir\n\
Insert | Toggle navigate-as-you-type mode\n\
~ | Jump to HOME dir\n\
& | Jump to initial dir\n\
@ -1481,7 +1484,7 @@ show_help(void)
b | Show bookmark key prompt\n\
c | Show change dir prompt\n\
d | Toggle detail view\n\
D | Toggle current file details screen\n\
D | Show current file details screen\n\
m | Show concise media info\n\
M | Show full media info\n\
s | Toggle sort by file size\n\
@ -1492,7 +1495,7 @@ show_help(void)
o | Open dir in NNN_DE_FILE_MANAGER\n\
p | Open entry in PAGER (fallback less)\n\
^K | Invoke file path copier\n\
^L, F2 | Force a redraw, exit filter prompt\n\
^L, F2 | Force a redraw, unfilter\n\
? | Toggle help and settings screen\n\
Q | Quit and change directory\n\
q, ^Q | Quit\n\n\n");
@ -1508,7 +1511,7 @@ show_help(void)
dprintf(fd, "BOOKMARKS\n");
for (; i < MAX_BM; ++i)
if (bookmark[i].key)
dprintf(fd, " %s: %s\n",
dprintf(fd, "\t%s: %s\n",
bookmark[i].key, bookmark[i].loc);
else
break;
@ -2452,7 +2455,8 @@ nochange:
static void
usage(void)
{
printf("usage: nnn [-l] [-i] [-p custom_nlay] [-S] [-v] [-h] [PATH]\n\n\
printf("usage: nnn [-c N] [-e] [-i] [-l] [n]\n\
[-p nlay] [-S] [-v] [-h] [PATH]\n\n\
The missing terminal file browser for X.\n\n\
positional arguments:\n\
PATH directory to open [default: current dir]\n\n\
@ -2462,7 +2466,7 @@ optional arguments:\n\
-i start in navigate-as-you-type mode\n\
-l start in light mode (fewer details)\n\
-n disable color for directory entries\n\
-p path to custom nlay\n\
-p nlay path to custom nlay\n\
-S start in disk usage analyzer mode\n\
-v show program version and exit\n\
-h show this help and exit\n\n\