mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Support F2 to refresh
This commit is contained in:
parent
65b818b0eb
commit
908965b6f5
|
@ -181,7 +181,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 | Force a redraw, exit filter prompt
|
||||
^L, F2 | Force a redraw, exit filter prompt
|
||||
? | Toggle help and settings screen
|
||||
Q | Quit and change directory
|
||||
q, ^Q | Quit
|
||||
|
@ -191,7 +191,7 @@ Right, Enter, l, ^M | Open file or enter dir
|
|||
|
||||
Filters support regexes to instantly (search-as-you-type) list the matching entries in the current directory.
|
||||
|
||||
There are 3 ways to reset a filter: <kbd>^L</kbd>, a search with no matches or an extra backspace at the filter prompt (like vi).
|
||||
There are 3 ways to reset a filter: <kbd>^L</kbd> (or <kbd>F2</kbd>), a search with no matches or an extra backspace at the filter prompt (like vi).
|
||||
|
||||
Common examples: If you want to list all matches starting with the filter expression, start the expression with a `^` (caret) symbol. Type `\.mkv` to list all MKV files.
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ static struct key bindings[] = {
|
|||
/* Toggle sort by time */
|
||||
{ 't', SEL_MTIME, "", "" },
|
||||
{ CONTROL('L'), SEL_REDRAW, "", "" },
|
||||
{ KEY_F(2), SEL_REDRAW, "", "" },
|
||||
/* Copy currently selected file path */
|
||||
{ CONTROL('K'), SEL_COPY, "", "" },
|
||||
/* Show help */
|
||||
|
|
4
nnn.1
4
nnn.1
|
@ -85,7 +85,7 @@ Open directory in NNN_DE_FILE_MANAGER
|
|||
Open current entry in PAGER (fallback less)
|
||||
.It Ic ^K
|
||||
Invoke file path copier
|
||||
.It Ic ^L
|
||||
.It Ic ^L, [F2]
|
||||
Force a redraw, exit filter prompt
|
||||
.It Ic \&?
|
||||
Toggle help and settings screen
|
||||
|
@ -141,7 +141,7 @@ instructions.
|
|||
Filters support regexes to instantly (search-as-you-type) list the matching
|
||||
entries in the current directory.
|
||||
.Pp
|
||||
There are 3 ways to reset a filter: \fI^L\fR, a search with no
|
||||
There are 3 ways to reset a filter: \fI^L\fR (or \fIF2\fR), a search with no
|
||||
matches or an extra backspace at the filter prompt (like vi).
|
||||
.Pp
|
||||
Common examples: If you want to list all matches starting with the filter
|
||||
|
|
17
nnn.c
17
nnn.c
|
@ -59,7 +59,8 @@ xprintf(int fd, const char *fmt, ...)
|
|||
return r;
|
||||
}
|
||||
|
||||
static int enabledbg()
|
||||
static int
|
||||
enabledbg()
|
||||
{
|
||||
FILE *fp = fopen("/tmp/nnn_debug", "w");
|
||||
|
||||
|
@ -77,7 +78,8 @@ static int enabledbg()
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void disabledbg()
|
||||
static void
|
||||
disabledbg()
|
||||
{
|
||||
close(DEBUG_FD);
|
||||
}
|
||||
|
@ -832,7 +834,8 @@ readln(char *path)
|
|||
case KEY_DOWN: // fallthrough
|
||||
case KEY_UP: // fallthrough
|
||||
case KEY_LEFT: // fallthrough
|
||||
case KEY_RIGHT:
|
||||
case KEY_RIGHT: // fallthrough
|
||||
case KEY_F(2):
|
||||
if (len == 1)
|
||||
cur = oldcur; // fallthrough
|
||||
default:
|
||||
|
@ -1379,7 +1382,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 | Force a redraw, exit filter prompt\n\
|
||||
^L, F2 | Force a redraw, exit filter prompt\n\
|
||||
? | Toggle help and settings screen\n\
|
||||
Q | Quit and change directory\n\
|
||||
q, ^Q | Quit\n\n\n");
|
||||
|
@ -2450,13 +2453,11 @@ main(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
/* Set locale */
|
||||
setlocale(LC_ALL, "");
|
||||
#ifdef DEBUGMODE
|
||||
enabledbg();
|
||||
#endif
|
||||
|
||||
/* Set locale */
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
initcurses();
|
||||
browse(ipath, ifilter);
|
||||
exitcurses();
|
||||
|
|
Loading…
Reference in a new issue