diff --git a/README.md b/README.md index fd24bc5f..412c26b7 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ 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 automatic matching dir entry + - Filter with automatic dir entry on unique match + - *Type-to-nav* (turbo navigation/always filter) mode - Contexts (_aka_ tabs/workspaces) with custom colors - Sessions, bookmarks, mark and visit a dir - Remote mounts (needs `sshfs`, `rclone`) diff --git a/misc/auto-completion/fish/nnn.fish b/misc/auto-completion/fish/nnn.fish index 968759fd..05f92ae2 100644 --- a/misc/auto-completion/fish/nnn.fish +++ b/misc/auto-completion/fish/nnn.fish @@ -12,7 +12,7 @@ else end complete -c nnn -s a -d 'auto-create NNN_FIFO' -complete -c nnn -s A -d 'disable dir auto-select' +complete -c nnn -s A -d 'disable dir auto-enter' complete -c nnn -s b -r -d 'bookmark key to open' -x -a '(echo $NNN_BMS | awk -F: -v RS=\; \'{print $1"\t"$2}\')' complete -c nnn -s c -d 'cli-only opener' complete -c nnn -s C -d 'color by context' diff --git a/misc/auto-completion/zsh/_nnn b/misc/auto-completion/zsh/_nnn index c2dfb31e..8de4bdfe 100644 --- a/misc/auto-completion/zsh/_nnn +++ b/misc/auto-completion/zsh/_nnn @@ -10,7 +10,7 @@ setopt localoptions noshwordsplit noksharrays local -a args args=( '(-a)-a[auto-create NNN_FIFO]' - '(-A)-A[disable dir auto-select]' + '(-A)-A[disable dir auto-enter]' '(-b)-b[bookmark key to open]:key char' '(-c)-c[cli-only opener]' '(-C)-C[color by context]' diff --git a/nnn.1 b/nnn.1 index ed1d7eb8..6e7915bf 100644 --- a/nnn.1 +++ b/nnn.1 @@ -201,6 +201,10 @@ Filters are strings (or regex patterns) to find matching entries in the current directory instantly (\fIsearch-as-you-type\fR). Matches are case-insensitive by default. The last filter in each context is persisted at runtime or in saved sessions. +.br +When there's a unique match and it's a directory, +.Nm +auto enters the directory. Use the relevant program option to disable this. .Pp Special keys at filter prompt: .Bd -literal @@ -228,6 +232,20 @@ Special keys at \fBempty filter prompt\fR: ------ + --------------------------------------- .Ed .Pp +Common regex use cases: +.Pp +(1) To list all matches starting with the filter expression, + start the expression with a '^' (caret) symbol. +.br +(2) Type '\\.mkv' to list all MKV files. +.br +(3) Use '.*' to match any character (\fIsort of\fR fuzzy search). +.br +(4) Exclude filenames having 'nnn' (compiled with PCRE lib): '^(?!nnn)' +.Pp +In the \fBtype-to-nav\fR mode directories are opened in filter +mode, allowing continuous navigation. +.Pp Additional special keys at \fBempty filter prompt\fR in \fBtype-to-nav\fR mode: .Bd -literal @@ -248,25 +266,6 @@ in \fBtype-to-nav\fR mode: ~ | Go HOME ------ + ------------------------ .Ed -.Pp -Common regex use cases: -.Pp -(1) To list all matches starting with the filter expression, - start the expression with a '^' (caret) symbol. -.br -(2) Type '\\.mkv' to list all MKV files. -.br -(3) Use '.*' to match any character (\fIsort of\fR fuzzy search). -.br -(4) Exclude filenames having 'nnn' (compiled with PCRE lib): '^(?!nnn)' -.Pp -In the \fItype-to-nav\fR mode directories are opened in filter -mode, allowing continuous navigation. -.br -When there's a unique match and it's a directory, -.Nm -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! diff --git a/src/nnn.c b/src/nnn.c index ed673b06..6dfcb777 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -8163,7 +8163,7 @@ static void usage(void) #ifndef NOFIFO " -a auto NNN_FIFO\n" #endif - " -A no dir auto-enter in type-to-nav\n" + " -A disable 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"