From 8f2e17303e0ea85c5daa3fb2df9f26ac44d31e13 Mon Sep 17 00:00:00 2001 From: KlzXS Date: Fri, 26 Nov 2021 10:33:11 +0100 Subject: [PATCH 01/15] Remove -E from sed in plugins --- plugins/dups | 16 ++++++++-------- plugins/xdgdefault | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/dups b/plugins/dups index a3fbbc69..27c1807f 100755 --- a/plugins/dups +++ b/plugins/dups @@ -28,17 +28,17 @@ printf "\ " > "$tmpfile" # shellcheck disable=SC2016 -find . -size +0 -type f -printf "%${size_digits}s %p\n" | sort -rn | uniq -w"${size_digits}" -D | sed -E ' -s/^ {,12}([0-9]{,12}) (.*)$/printf "%s %s\\n" "$(md5sum "\2")" "d\1"/ -' | tr '\n' '\0' | xargs -0 -n1 sh -c | sort | { uniq -w32 --all-repeated=separate; echo; } | sed -nE ' +find . -size +0 -type f -printf "%${size_digits}s %p\n" | sort -rn | uniq -w"${size_digits}" -D | sed -e ' +s/^ \{0,12\}\([0-9]\{0,12\}\) \(.*\)$/printf "%s %s\\n" "$(md5sum "\2")" "d\1"/ +' | tr '\n' '\0' | xargs -0 -n1 sh -c | sort | { uniq -w32 --all-repeated=separate; echo; } | sed -ne ' h -s/^(.{32}).* d([0-9]*)$/## md5sum: \1 size: \2 bytes/p +s/^\(.\{32\}\).* d\([0-9]*\)$/## md5sum: \1 size: \2 bytes/p g :loop N /.*\n$/!b loop -p' | sed -E 's/^.{32} (.*) d[0-9]*$/\1/' >> "$tmpfile" +p' | sed -e 's/^.\{32\} \(.*\) d[0-9]*$/\1/' >> "$tmpfile" "$EDITOR" "$tmpfile" @@ -46,7 +46,7 @@ printf "Remove commented files? (yes/no) [default=n]: " read -r commented if [ "$commented" = "y" ]; then - sedcmd="/^(##|[^#]).*/d; /^$/d; s/^# *(.*)$/\1/" + sedcmd="/^##.*/d; /^[^#].*/d; /^$/d; s/^# *\(.*\)$/\1/" else printf "Press any key to exit" read -r _ @@ -58,10 +58,10 @@ read -r force if [ "$force" = "f" ]; then #shellcheck disable=SC2016 - sed -E "$sedcmd" "$tmpfile" | tr '\n' '\0' | xargs -0 -r sh -c 'rm -f "$0" "$@" Date: Tue, 14 Dec 2021 17:16:56 +0100 Subject: [PATCH 02/15] Replace restorepreview workaround --- patches/restorepreview/mainline.diff | 7 +++++-- plugins/preview-tui | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/patches/restorepreview/mainline.diff b/patches/restorepreview/mainline.diff index b0118514..402eeea9 100644 --- a/patches/restorepreview/mainline.diff +++ b/patches/restorepreview/mainline.diff @@ -1,5 +1,8 @@ -# Description: Adds preview pipe to enable closing and re-opening -# the preview pane when running an undetached editor. +# Description: Adds preview pipe to enable closing and re-opening the preview +# pane when running an undetached editor. If you are using vim +# you might experience incorrectly resized window. Consider adding +# the following to your vimrc: +# autocmd VimEnter * :silent exec "!kill -s WINCH $PPID" # # Authors: Luuk van Baal diff --git a/plugins/preview-tui b/plugins/preview-tui index c718af40..6af3d658 100755 --- a/plugins/preview-tui +++ b/plugins/preview-tui @@ -415,7 +415,7 @@ preview_fifo() { if [ -n "$selection" ]; then kill "$(cat "$PREVIEWPID")" [ -p "$FIFO_UEBERZUG" ] && ueberzug_remove - [ "$selection" = "close" ] && sleep 0.15 && pkill -P "$$" && exit + [ "$selection" = "close" ] && break preview_file "$selection" printf "%s" "$selection" > "$CURSEL" fi From 7aef60a9d54ee2cdab23a2a571d905d24719a3b7 Mon Sep 17 00:00:00 2001 From: NRK Date: Wed, 15 Dec 2021 00:45:58 +0600 Subject: [PATCH 03/15] add icon for opus files --- src/icons-nerdfont.h | 1 + src/icons.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/icons-nerdfont.h b/src/icons-nerdfont.h index bda29321..d5316fbe 100644 --- a/src/icons-nerdfont.h +++ b/src/icons-nerdfont.h @@ -187,6 +187,7 @@ /* O */ #define ICON_EXT_O ICON_MANUAL #define ICON_EXT_OGG ICON_MUSICFILE +#define ICON_EXT_OPUS ICON_MUSICFILE #define ICON_EXT_ODOWNLOAD ICON_DOWNLOADS #define ICON_EXT_OUT ICON_LINUX diff --git a/src/icons.h b/src/icons.h index cc5fded2..ca345a45 100644 --- a/src/icons.h +++ b/src/icons.h @@ -223,6 +223,7 @@ static const struct icon_pair icons_ext[] = { /* O */ {"o", FILE_MANPAGE, 0}, {"ogg", FA_FILE_AUDIO_O, COLOR_AUDIO}, + {"opus", FA_FILE_AUDIO_O, COLOR_AUDIO}, {"opdownload", FA_DOWNLOAD, 0}, {"out", FA_LINUX, 0}, @@ -436,6 +437,7 @@ static const struct icon_pair icons_ext[] = { /* O */ {"o", ICON_EXT_O, 0}, {"ogg", ICON_EXT_OGG, COLOR_AUDIO}, + {"opus", ICON_EXT_OPUS, COLOR_AUDIO}, {"opdownload", ICON_EXT_ODOWNLOAD, 0}, {"out", ICON_EXT_OUT, 0}, From 8ba43edffcbc4918ff077f7cb49f668360e12942 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Fri, 17 Dec 2021 12:41:29 +0100 Subject: [PATCH 04/15] Restorepreview when launching subshell --- patches/restorepreview/mainline.diff | 76 ++++++++++++++++------------ 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/patches/restorepreview/mainline.diff b/patches/restorepreview/mainline.diff index 402eeea9..979f9659 100644 --- a/patches/restorepreview/mainline.diff +++ b/patches/restorepreview/mainline.diff @@ -7,20 +7,20 @@ # Authors: Luuk van Baal diff --git a/src/nnn.c b/src/nnn.c -index c7440149..8ae75614 100644 +index 4243f2cc..b893f573 100644 --- a/src/nnn.c +++ b/src/nnn.c -@@ -368,7 +368,8 @@ typedef struct { - uint_t stayonsel : 1; /* Disable auto-proceed on select */ - uint_t trash : 2; /* Trash method 0: rm -rf, 1: trash-cli, 2: gio trash */ - uint_t uidgid : 1; /* Show owner and group info */ +@@ -370,7 +370,8 @@ typedef struct { + uint_t stayonsel : 1; /* Disable auto-proceed on select */ + uint_t trash : 2; /* Trash method 0: rm -rf, 1: trash-cli, 2: gio trash */ + uint_t uidgid : 1; /* Show owner and group info */ - uint_t reserved : 7; /* Adjust when adding/removing a field */ + uint_t previewer : 1; /* Run state of previewer */ + uint_t reserved : 6; /* Adjust when adding/removing a field */ } runstate; /* Contexts or workspaces */ -@@ -516,6 +517,9 @@ static char g_tmpfpath[TMP_LEN_MAX] __attribute__ ((aligned)); +@@ -518,6 +519,9 @@ static char g_tmpfpath[TMP_LEN_MAX] __attribute__ ((aligned)); /* Buffer to store plugins control pipe location */ static char g_pipepath[TMP_LEN_MAX] __attribute__ ((aligned)); @@ -30,7 +30,7 @@ index c7440149..8ae75614 100644 /* Non-persistent runtime states */ static runstate g_state; -@@ -690,12 +694,13 @@ static const char * const messages[] = { +@@ -692,12 +696,13 @@ static const char * const messages[] = { #define NNN_FCOLORS 5 #define NNNLVL 6 #define NNN_PIPE 7 @@ -50,7 +50,7 @@ index c7440149..8ae75614 100644 static const char * const env_cfg[] = { "NNN_OPTS", -@@ -706,6 +711,7 @@ static const char * const env_cfg[] = { +@@ -708,6 +713,7 @@ static const char * const env_cfg[] = { "NNN_FCOLORS", "NNNLVL", "NNN_PIPE", @@ -58,7 +58,7 @@ index c7440149..8ae75614 100644 "NNN_MCLICK", "NNN_SEL", "NNN_ARCHIVE", -@@ -850,7 +856,7 @@ static int set_sort_flags(int r); +@@ -854,7 +860,7 @@ static int set_sort_flags(int r); static void statusbar(char *path); static bool get_output(char *file, char *arg1, char *arg2, int fdout, bool multi, bool page); #ifndef NOFIFO @@ -67,7 +67,7 @@ index c7440149..8ae75614 100644 #endif /* Functions */ -@@ -3065,7 +3071,7 @@ try_quit: +@@ -3061,7 +3067,7 @@ try_quit: } else { #ifndef NOFIFO if (!g_state.fifomode) @@ -76,7 +76,7 @@ index c7440149..8ae75614 100644 #endif escaped = TRUE; settimeout(); -@@ -5164,15 +5170,20 @@ static bool run_cmd_as_plugin(const char *file, char *runfile, uchar_t flags) +@@ -5160,15 +5166,20 @@ static bool run_cmd_as_plugin(const char *file, char *runfile, uchar_t flags) static bool plctrl_init(void) { @@ -101,7 +101,7 @@ index c7440149..8ae75614 100644 return EXIT_SUCCESS; } -@@ -5201,6 +5212,21 @@ static ssize_t read_nointr(int fd, void *buf, size_t count) +@@ -5197,6 +5208,21 @@ static ssize_t read_nointr(int fd, void *buf, size_t count) return len; } @@ -123,7 +123,7 @@ index c7440149..8ae75614 100644 static char *readpipe(int fd, char *ctxnum, char **path) { char ctx, *nextpath = NULL; -@@ -5864,7 +5890,7 @@ static void populate(char *path, char *lastname) +@@ -5862,7 +5888,7 @@ static void populate(char *path, char *lastname) } #ifndef NOFIFO @@ -132,7 +132,7 @@ index c7440149..8ae75614 100644 { if (!fifopath) return; -@@ -5880,6 +5906,12 @@ static void notify_fifo(bool force) +@@ -5878,6 +5904,12 @@ static void notify_fifo(bool force) } } @@ -145,16 +145,16 @@ index c7440149..8ae75614 100644 static struct entry lastentry; if (!force && !memcmp(&lastentry, &pdents[cur], sizeof(struct entry))) -@@ -5912,7 +5944,7 @@ static void send_to_explorer(int *presel) - if (fd > 1) - close(fd); - } else +@@ -5910,7 +5942,7 @@ static void send_to_explorer(int *presel) + if (fd > 1) + close(fd); + } else - notify_fifo(TRUE); /* Send opened path to NNN_FIFO */ + notify_fifo(TRUE, FALSE); /* Send opened path to NNN_FIFO */ } #endif -@@ -5945,7 +5977,7 @@ static void move_cursor(int target, int ignore_scrolloff) +@@ -5943,7 +5975,7 @@ static void move_cursor(int target, int ignore_scrolloff) #ifndef NOFIFO if (!g_state.fifomode) @@ -163,16 +163,16 @@ index c7440149..8ae75614 100644 #endif } -@@ -6567,7 +6599,7 @@ static bool browse(char *ipath, const char *session, int pkey) +@@ -6565,7 +6597,7 @@ static bool browse(char *ipath, const char *session, int pkey) pEntry pent; enum action sel; struct stat sb; - int r = -1, presel, selstartid = 0, selendid = 0; + int r = -1, presel, selstartid = 0, selendid = 0, previewkey = 0; const uchar_t opener_flags = (cfg.cliopener ? F_CLI : (F_NOTRACE | F_NOSTDIN | F_NOWAIT)); - bool watch = FALSE, cd = TRUE; + bool watch = FALSE, cd = TRUE; ino_t inode = 0; -@@ -6821,7 +6853,7 @@ nochange: +@@ -6819,7 +6851,7 @@ nochange: move_cursor(r, 1); #ifndef NOFIFO else if ((event.bstate == BUTTON1_PRESSED) && !g_state.fifomode) @@ -181,7 +181,7 @@ index c7440149..8ae75614 100644 #endif /* Handle right click selection */ if (event.bstate == BUTTON3_PRESSED) { -@@ -6981,7 +7013,14 @@ nochange: +@@ -6979,7 +7011,14 @@ nochange: && strstr(g_buf, "text") #endif ) { @@ -196,14 +196,14 @@ index c7440149..8ae75614 100644 if (cfg.filtermode) { presel = FILTER; clearfilter(); -@@ -7293,8 +7332,14 @@ nochange: +@@ -7291,8 +7330,14 @@ nochange: copycurname(); goto nochange; case SEL_EDIT: + if (g_state.previewer) + notify_fifo(FALSE, TRUE); - if (!g_state.picker) - spawn(editor, newpath, NULL, NULL, F_CLI); + if (!g_state.picker) + spawn(editor, newpath, NULL, NULL, F_CLI); + if (g_state.previewer) { + pkey = previewkey; + goto run_plugin; @@ -211,15 +211,15 @@ index c7440149..8ae75614 100644 continue; default: /* SEL_LOCK */ lock_terminal(); -@@ -7660,6 +7705,7 @@ nochange: - cd = FALSE; +@@ -7661,6 +7706,7 @@ nochange: + cd = FALSE; goto begin; } +run_plugin: case SEL_PLUGIN: /* Check if directory is accessible */ if (!xdiraccess(plgpath)) { -@@ -7685,6 +7731,12 @@ nochange: +@@ -7686,6 +7732,12 @@ nochange: goto nochange; } @@ -232,7 +232,21 @@ index c7440149..8ae75614 100644 if (tmp[0] == '-' && tmp[1]) { ++tmp; r = FALSE; /* Do not refresh dir after completion */ -@@ -8281,8 +8333,10 @@ static void cleanup(void) +@@ -7740,7 +7792,13 @@ nochange: + case SEL_SHELL: // fallthrough + case SEL_LAUNCH: // fallthrough + case SEL_PROMPT: ++ if (g_state.previewer) ++ notify_fifo(FALSE, TRUE); + r = handle_cmd(sel, newpath); ++ if (g_state.previewer) { ++ pkey = previewkey; ++ goto run_plugin; ++ } + + /* Continue in type-to-nav mode, if enabled */ + if (cfg.filtermode) +@@ -8282,8 +8340,10 @@ static void cleanup(void) if (g_state.autofifo) unlink(fifopath); #endif @@ -244,7 +258,7 @@ index c7440149..8ae75614 100644 #ifdef DEBUG disabledbg(); #endif -@@ -8786,7 +8840,7 @@ int main(int argc, char *argv[]) +@@ -8787,7 +8847,7 @@ int main(int argc, char *argv[]) #ifndef NOFIFO if (!g_state.fifomode) From 95f709f86a96304582f80eb52dcae4450810175b Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 18 Dec 2021 22:34:24 +0100 Subject: [PATCH 05/15] Preview-tui fix gif whitespace name --- plugins/preview-tui | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/preview-tui b/plugins/preview-tui index 6af3d658..8b642e35 100755 --- a/plugins/preview-tui +++ b/plugins/preview-tui @@ -339,13 +339,14 @@ generate_preview() { epub) gnome-epub-thumbnailer "$3" "$NNN_PREVIEWDIR/$3.jpg" ;; font) fontpreview -i "$3" -o "$NNN_PREVIEWDIR/$3.jpg" ;; gif) if [ -p "$FIFO_UEBERZUG" ] && exists convert; then + frameprefix="$NNN_PREVIEWDIR/$3/${3##*/}" if [ ! -d "$NNN_PREVIEWDIR/$3" ]; then mkdir -p "$NNN_PREVIEWDIR/$3" - convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$NNN_PREVIEWDIR/$3/${3##*/}.jpg" + convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$frameprefix.jpg" fi while true; do - for frame in $(find "$NNN_PREVIEWDIR/$3"/*.jpg | sort -V); do - image_preview "$1" "$2" "$frame" + for i in $(seq 0 "$(($(find "$NNN_PREVIEWDIR/$3" | wc -l) - 2))"); do + image_preview "$1" "$2" "$frameprefix-$i.jpg" sleep 0.1 done done & From b851b58e835d62ed1614fcc215315f3082df7f66 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Mon, 20 Dec 2021 02:39:10 +0100 Subject: [PATCH 06/15] Preview-tui fix gif conversion --- plugins/preview-tui | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/plugins/preview-tui b/plugins/preview-tui index 8b642e35..81f9f4fb 100755 --- a/plugins/preview-tui +++ b/plugins/preview-tui @@ -339,19 +339,22 @@ generate_preview() { epub) gnome-epub-thumbnailer "$3" "$NNN_PREVIEWDIR/$3.jpg" ;; font) fontpreview -i "$3" -o "$NNN_PREVIEWDIR/$3.jpg" ;; gif) if [ -p "$FIFO_UEBERZUG" ] && exists convert; then - frameprefix="$NNN_PREVIEWDIR/$3/${3##*/}" + frameprefix="$NNN_PREVIEWDIR/$3/${3##*/}" if [ ! -d "$NNN_PREVIEWDIR/$3" ]; then mkdir -p "$NNN_PREVIEWDIR/$3" - convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$frameprefix.jpg" + convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$frameprefix.jpg" || + MAGICK_TMPDIR="/tmp" convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$frameprefix.jpg" fi - while true; do - for i in $(seq 0 "$(($(find "$NNN_PREVIEWDIR/$3" | wc -l) - 2))"); do - image_preview "$1" "$2" "$frameprefix-$i.jpg" - sleep 0.1 - done - done & - printf "%s" "$!" > "$PREVIEWPID" - return + frames=$(($(find "$NNN_PREVIEWDIR/$3" | wc -l) - 2)) + [ $frames -lt 0 ] && return + while true; do + for i in $(seq 0 $frames); do + image_preview "$1" "$2" "$frameprefix-$i.jpg" + sleep 0.1 + done + done & + printf "%s" "$!" > "$PREVIEWPID" + return else exec >/dev/tty image_preview "$1" "$2" "$3" From bd6e7e81479823fdf28cdc507027982011039c9f Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Mon, 20 Dec 2021 11:56:54 +0530 Subject: [PATCH 07/15] Update bug report template --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8fb4f8fc..f4bd933e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -36,6 +36,7 @@ If we need more information and there is no communication from the bug reporter - [ ] Custom desktop opener (if applicable): - [ ] Program options used: - [ ] Configuration options set: +- [ ] Plugins are installed - [ ] Issue exists on `nnn` master #### Exact steps to reproduce the issue From 892e4c008275b1543a676c8d1eb7c40dec0e3b08 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 25 Dec 2021 07:49:03 +0530 Subject: [PATCH 08/15] Use terms consistent with man page in docs --- README.md | 4 ++-- src/nnn.c | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index cfc48443..20792e65 100644 --- a/README.md +++ b/README.md @@ -58,13 +58,13 @@ Runs on the Pi, [Termux](https://www.youtube.com/embed/AbaauM7gUJw) (Android), L - Disk usage analyzer (block/apparent) - File picker, (neo)vim plugin - Navigation - - *Type-to-nav* mode with dir auto-select + - *Type-to-nav* mode with automatic matching dir entry - Contexts (_aka_ tabs/workspaces) with custom colors - Sessions, bookmarks with hotkeys; mark and visit a dir - Remote mounts (needs `sshfs`, `rclone`) - Familiar shortcuts (arrows, ~, -, @), quick look-up - `cd` on quit (*easy* shell integration) - - Auto-advance on opening files + - Auto-proceed on file open and selection - Search - Instant filtering with *search-as-you-type* - Regex (POSIX/PCRE) and string (default) filters diff --git a/src/nnn.c b/src/nnn.c index 4243f2cc..6305dd98 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -334,7 +334,7 @@ typedef struct { uint_t prefersel : 1; /* Prefer selection over current, if exists */ uint_t fileinfo : 1; /* Show file information on hover */ uint_t nonavopen : 1; /* Open file on right arrow or `l` */ - uint_t autoselect : 1; /* Auto-select dir in type-to-nav mode */ + uint_t autoenter : 1; /* auto-enter dir in type-to-nav mode */ uint_t reserved2 : 1; uint_t useeditor : 1; /* Use VISUAL to open text files */ uint_t reserved3 : 3; @@ -414,7 +414,7 @@ static settings cfg = { 0, /* prefersel */ 0, /* fileinfo */ 0, /* nonavopen */ - 1, /* autoselect */ + 1, /* autoenter */ 0, /* reserved2 */ 0, /* useeditor */ 0, /* reserved3 */ @@ -3373,7 +3373,7 @@ static int filterentries(char *path, char *lastname) if (cfg.filtermode) { switch (*ch) { case '\'': // fallthrough /* Go to first non-dir file */ - case '+': // fallthrough /* Toggle auto-advance */ + case '+': // fallthrough /* Toggle auto-proceed on open */ case ',': // fallthrough /* Mark CWD */ case '-': // fallthrough /* Visit last visited dir */ case '.': // fallthrough /* Show hidden files */ @@ -3434,17 +3434,17 @@ static int filterentries(char *path, char *lastname) continue; } - /* If the only match is a dir, auto-select and cd into it */ + /* If the only match is a dir, auto-enter and cd into it */ if (ndents == 1 && cfg.filtermode - && cfg.autoselect && (pdents[0].flags & DIR_OR_DIRLNK)) { + && cfg.autoenter && (pdents[0].flags & DIR_OR_DIRLNK)) { *ch = KEY_ENTER; cur = 0; goto end; } /* - * redraw() should be above the auto-select optimization, for - * the case where there's an issue with dir auto-select, say, + * redraw() should be above the auto-enter optimization, for + * the case where there's an issue with dir auto-enter, say, * due to a permission problem. The transition is _jumpy_ in * case of such an error. However, we optimize for successful * cases where the dir has permissions. This skips a redraw(). @@ -5013,7 +5013,7 @@ static void show_help(const char *path) "9Lt h Parent%-12c~ ` @ - ~, /, start, prev\n" "5Ret Rt l Open%-20c' First file/match\n" "9g ^A Top%-21c. Toggle hidden\n" - "9G ^E End%-21c+ Toggle auto-advance\n" + "9G ^E End%-21c+ Toggle auto-proceed on open\n" "8B (,) Book(mark)%-11cb ^/ Select bookmark\n" "a1-4 Context%-11c(Sh)Tab Cycle/new context\n" "62Esc ^Q Quit%-20cq Quit context\n" @@ -8112,7 +8112,7 @@ static void usage(void) #ifndef NOFIFO " -a auto NNN_FIFO\n" #endif - " -A no dir auto-select\n" + " -A no dir auto-enter\n" " -b key open bookmark key (trumps -s/S)\n" " -c cli-only NNN_OPENER (trumps -e)\n" " -C 8-color scheme\n" @@ -8129,7 +8129,7 @@ static void usage(void) " -g regex filters\n" " -H show hidden files\n" " -i show current file info\n" - " -J no auto-proceed on select\n" + " -J no auto-proceed on selection\n" " -K detect key collision\n" " -l val set scroll lines\n" " -n type-to-nav mode\n" @@ -8319,7 +8319,7 @@ int main(int argc, char *argv[]) break; #endif case 'A': - cfg.autoselect = 0; + cfg.autoenter = 0; break; case 'b': if (env_opts_id < 0) From 23edf571a7099b58890738cedf7026b7b2f39069 Mon Sep 17 00:00:00 2001 From: NRK Date: Fri, 24 Dec 2021 04:51:21 +0600 Subject: [PATCH 09/15] make the manpage more clear some of the terms used in the manpage aren't exactly obvious, especially to a new user. this is an attempt at making the manual more clear and remove any potential confusion. here's a couple issues i've noticed where users were confused due to non clear manpage description: https://github.com/jarun/nnn/issues/1268 https://github.com/jarun/nnn/issues/1269 https://github.com/jarun/nnn/issues/1209 --- nnn.1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nnn.1 b/nnn.1 index ba1ac8f5..293f018b 100644 --- a/nnn.1 +++ b/nnn.1 @@ -89,6 +89,7 @@ supports the following options: .Pp .Fl J disable auto-proceed on select + (eg. making a selection will no longer move cursor to the next entry) .Pp .Fl K test for keybind collision @@ -113,10 +114,11 @@ supports the following options: .Pp .Fl r show cp, mv progress - (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS) + (Linux-only, needs \fIadvcpmv\fR; '^T' shows the progress on BSD/macOS) .Pp .Fl R - disable rollover at edges + disable rollover at edges (eg. pressing \fIdown\fR while on the last + entry will no longer move cursor to the first entry and vice\-versa) .Pp .Fl "s name" load a session by name @@ -142,8 +144,8 @@ supports the following options: show version and exit .Pp .Fl x - show notis on selection cp, mv, rm completion - copy path to system clipboard on select + show notis on selection cp, mv, rm completion (requires \fI.cbcp\fR plugin) + copy path to system clipboard on select (requires \fI.ntfy\fR plugin) show xterm title (if non-picker mode) .Pp .Fl h From 9a26739132bded3054a24640751d2f81b8bc34c2 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 25 Dec 2021 07:46:54 +0600 Subject: [PATCH 10/15] fix plugin requirement --- nnn.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nnn.1 b/nnn.1 index 293f018b..7e6ceced 100644 --- a/nnn.1 +++ b/nnn.1 @@ -144,8 +144,8 @@ supports the following options: show version and exit .Pp .Fl x - show notis on selection cp, mv, rm completion (requires \fI.cbcp\fR plugin) - copy path to system clipboard on select (requires \fI.ntfy\fR plugin) + show notifications on selection cp, mv, rm completion (requires \fI.ntfy\fR plugin) + copy path to system clipboard on select (requires \fI.cbcp\fR plugin) show xterm title (if non-picker mode) .Pp .Fl h From f7298efa994ef94be15154e5d13b8c8db2255be4 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 25 Dec 2021 08:12:18 +0600 Subject: [PATCH 11/15] reword 'select' -> 'selection' --- nnn.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nnn.1 b/nnn.1 index 7e6ceced..79d589d9 100644 --- a/nnn.1 +++ b/nnn.1 @@ -88,7 +88,7 @@ supports the following options: show current file information in info bar (may be slow) .Pp .Fl J - disable auto-proceed on select + disable auto-proceed on selection (eg. making a selection will no longer move cursor to the next entry) .Pp .Fl K @@ -145,7 +145,7 @@ supports the following options: .Pp .Fl x show notifications on selection cp, mv, rm completion (requires \fI.ntfy\fR plugin) - copy path to system clipboard on select (requires \fI.cbcp\fR plugin) + copy path to system clipboard on selection (requires \fI.cbcp\fR plugin) show xterm title (if non-picker mode) .Pp .Fl h From c234c05b3de785b4c5b24f14623f68069dccb938 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 25 Dec 2021 08:13:31 +0600 Subject: [PATCH 12/15] clarify '+' keybinding in type-to-nav mode --- nnn.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnn.1 b/nnn.1 index 79d589d9..8cdf57fa 100644 --- a/nnn.1 +++ b/nnn.1 @@ -235,7 +235,7 @@ in \fBtype-to-nav\fR mode: Key | Function ------ + ------------------------ ' | Go to first non-dir file - + | Toggle auto-advance + + | Toggle auto-proceed on file open , | Mark CWD - | Go to last visited dir . | Show hidden files From d215a9c61dc0973c864a26cc924af7eb7f63e282 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 25 Dec 2021 08:24:38 +0600 Subject: [PATCH 13/15] -A doc: change auto-select to auto-enter --- nnn.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nnn.1 b/nnn.1 index 8cdf57fa..5ef39b23 100644 --- a/nnn.1 +++ b/nnn.1 @@ -23,7 +23,7 @@ is a performance-optimized, feature-packed fork of noice .Em http://git.2f30.org/noice/ with seamless desktop integration, simplified navigation, .Em type-to-nav -mode with auto select, disk usage analyzer mode, bookmarks, +mode with auto enter, disk usage analyzer mode, bookmarks, contexts, application launcher, familiar navigation shortcuts, subshell spawning and much more. It remains a simple and efficient file manager that stays out of your way. @@ -48,7 +48,7 @@ supports the following options: auto-setup temporary NNN_FIFO (described in ENVIRONMENT section) .Pp .Fl A - disable directory auto-select in type-to-nav mode + disable directory auto-enter in type-to-nav mode .Pp .Fl "b key" specify bookmark key to open @@ -265,8 +265,8 @@ mode, allowing continuous navigation. .br When there's a unique match and it's a directory, .Nm -auto selects the directory and enters it in this mode. Use the relevant -program option to disable this behaviour. +auto enters it in this mode. Use the relevant program option to disable this +behaviour. .Sh SELECTION .Nm allows file selection across directories and contexts! From 62f1004836e9eb280af31bc3f0fc3584fe2c995a Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 25 Dec 2021 08:29:46 +0600 Subject: [PATCH 14/15] upadte the source code according to the docs --- nnn.1 | 2 +- src/nnn.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nnn.1 b/nnn.1 index 5ef39b23..17b632b5 100644 --- a/nnn.1 +++ b/nnn.1 @@ -235,7 +235,7 @@ in \fBtype-to-nav\fR mode: Key | Function ------ + ------------------------ ' | Go to first non-dir file - + | Toggle auto-proceed on file open + + | Toggle auto-proceed on open , | Mark CWD - | Go to last visited dir . | Show hidden files diff --git a/src/nnn.c b/src/nnn.c index 6305dd98..ea753d07 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -8112,7 +8112,7 @@ static void usage(void) #ifndef NOFIFO " -a auto NNN_FIFO\n" #endif - " -A no dir auto-enter\n" + " -A no dir auto-enter in type-to-nav\n" " -b key open bookmark key (trumps -s/S)\n" " -c cli-only NNN_OPENER (trumps -e)\n" " -C 8-color scheme\n" From ce58aab6b2148ca9af184da77d31ce3117ab6c10 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 25 Dec 2021 08:39:29 +0600 Subject: [PATCH 15/15] slight reword --- nnn.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nnn.1 b/nnn.1 index 17b632b5..257ca193 100644 --- a/nnn.1 +++ b/nnn.1 @@ -23,7 +23,7 @@ is a performance-optimized, feature-packed fork of noice .Em http://git.2f30.org/noice/ with seamless desktop integration, simplified navigation, .Em type-to-nav -mode with auto enter, disk usage analyzer mode, bookmarks, +mode with dir auto-enter, disk usage analyzer mode, bookmarks, contexts, application launcher, familiar navigation shortcuts, subshell spawning and much more. It remains a simple and efficient file manager that stays out of your way. @@ -89,7 +89,7 @@ supports the following options: .Pp .Fl J disable auto-proceed on selection - (eg. making a selection will no longer move cursor to the next entry) + (eg. selecting an entry will no longer move cursor to the next entry) .Pp .Fl K test for keybind collision