From cb6eb71ef3992d4d756b604bedc20e1d7427af87 Mon Sep 17 00:00:00 2001 From: Arun Date: Tue, 14 Jun 2022 13:24:11 +0530 Subject: [PATCH] Updated Concepts (markdown) --- Concepts.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Concepts.md b/Concepts.md index 360717e..4656b89 100644 --- a/Concepts.md +++ b/Concepts.md @@ -86,6 +86,23 @@ Special keys at **_empty filter prompt_**: | Bksp | Stay at filter prompt and refresh dir | | Del | Stay at filter prompt and refresh dir | +#### Common regex use cases + +- to list all matches starting with the filter expression, start with a `^` (caret) +- type `\.mkv` to list all MKV files +- use `.*` to match any character (_sort of_ fuzzy search) +- exclude filenames having `nnn` ([with PCRE](https://github.com/jarun/nnn/wiki/Developer-guides#compile-with-pcre)): `^(?!nnn)` + +#### Limitation + +Use regex for case-sensitive filtering with wide chars as the function [`strcasestr`](https://manpages.ubuntu.com/manpages/bionic/en/man3/strcasestr.3.html) (used for string filters) does not work with multibyte locales ([ref1](https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings), [ref2](https://www.gnu.org/software/gnulib/manual/html_node/c_002dstrcasestr.html)). + +## Type-to-nav + +In this mode directories are opened in filter mode, allowing continuous navigation. + +To start in _type-to-nav_ mode, use the program option `-n` or press ^N. + Additional special keys at **_empty filter prompt_** in **_type-to-nav_** mode: @@ -114,23 +131,6 @@ Additional special keys at **_empty filter prompt_** in **_type-to-nav_** mode:
-#### Common regex use cases - -- to list all matches starting with the filter expression, start with a `^` (caret) -- type `\.mkv` to list all MKV files -- use `.*` to match any character (_sort of_ fuzzy search) -- exclude filenames having `nnn` ([with PCRE](https://github.com/jarun/nnn/wiki/Developer-guides#compile-with-pcre)): `^(?!nnn)` - -#### Limitation - -Use regex for case-sensitive filtering with wide chars as the function [`strcasestr`](https://manpages.ubuntu.com/manpages/bionic/en/man3/strcasestr.3.html) (used for string filters) does not work with multibyte locales ([ref1](https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings), [ref2](https://www.gnu.org/software/gnulib/manual/html_node/c_002dstrcasestr.html)). - -## Type-to-nav - -In this mode directories are opened in filter mode, allowing continuous navigation. - -To start in _type-to-nav_ mode, use the program option `-n` or press ^N. - ## Selection `nnn` allows file selection across directories and contexts!