From e495886b59688ddfb2df83dc782081552169bc09 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Wed, 7 Jun 2017 11:26:33 +0530 Subject: [PATCH] Suppress output when spawning DE file manager --- README.md | 15 +++++++-------- nnn.1 | 17 ++++++++--------- nnn.c | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index b04ac14e..074cd1e1 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,11 @@ Noice is Not Noice, a noicer fork... ### Introduction -`nnn` is a fork of [noice](http://git.2f30.org/noice/), a blazing-fast lightweight terminal file browser with easy keyboard shortcuts for navigation, opening files and running tasks. noice is developed considering terminal based systems. There is no config file and mime associations are hard-coded. However, the incredible user-friendliness and speed make it a perfect utility on modern distros. +`nnn` is a fork of [noice](http://git.2f30.org/noice/), a blazing-fast lightweight terminal file browser with easy keyboard shortcuts for navigation, opening files and running tasks. noice is developed considering terminal based systems. There is no config file and mime associations are hard-coded. However, the incredible user-friendliness and speed make it a perfect candidate for modern distros. -`nnn` invokes the desktop opener at runtime, adds new navigation options, [navigate-as-you-type](#navigate-as-you-type-mode) mode, enhanced DE integration, a disk usage analyzer mode, comprehensive file details and much more. Add to that a huge [performance](#performance) boost. For a detailed comparison, visit [nnn vs. noice](https://github.com/jarun/nnn/wiki/nnn-vs.-noice). +`nnn` works with the desktop opener, adds new navigation options, [navigate-as-you-type](#navigate-as-you-type-mode) mode, enhanced DE integration, a disk usage analyzer mode, comprehensive file details and much more. Add to that a huge [performance](#performance) boost. For a detailed comparison, visit [nnn vs. noice](https://github.com/jarun/nnn/wiki/nnn-vs.-noice). -If you want to edit a file in vim with some soothing music in the background while referring to a spec in your GUI PDF viewer, `nnn` got it! All from the same terminal session. Follow the instructions in the [quickstart](#quickstart) section and see how `nnn` simplifies those long desktop sessions... +If you want to edit a file in vim with some soothing music in the background while referring to a spec in your GUI PDF viewer, `nnn` got it! [Quickstart](#quickstart) and see how `nnn` simplifies those long desktop sessions... Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/issues/1). @@ -186,11 +186,11 @@ Right, Enter, l, ^M | Open file or enter dir #### Filters -Filters support regexes to display only the matched entries in the current directory view. This effectively allows searching through the directory tree for a particular entry. Matching entries are shown instantly (search-as-you-type). +Filters support regexes to instantly (search-as-you-type) list the matching entries in the current directory. -Filters do not stack on top of each other. They are applied anew every time. There are 3 ways to reset a filter: ^L, a search with no matches or an extra backspace at the filter prompt (like vi). +There are 3 ways to reset a filter: ^L, a search with no matches or an extra backspace at the filter prompt (like vi). -Examples: If you want to list all matches starting with the filter expression (a common use case), start the expression with a `^` (caret) symbol. To list all MKV files type `\.mkv`. +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. If `nnn` is invoked as root the default filter will also match hidden files. @@ -242,9 +242,8 @@ Add the following to your shell's rc file for the best experience: 3. Set a desktop file manager to open directories with (if you ever need to). E.g.: export NNN_DE_FILE_MANAGER=thunar -4. Start `nnn`. - n +Run `n`. ### How to diff --git a/nnn.1 b/nnn.1 index be7737d3..cc823a1e 100644 --- a/nnn.1 +++ b/nnn.1 @@ -133,19 +133,18 @@ to change to the last visited directory on quit requires shell integration in a few easy steps. Please visit the project page (linked below) for the instructions. .Sh FILTERS -Filters support regexes to display only the matched -entries in the current directory view. This effectively allows -searching through the directory tree for a particular entry. Matching entries -are shown instantly (\fIsearch-as-you-type\fR). +Filters support regexes to instantly (search-as-you-type) list the matching +entries in the current directory. .Pp -Filters do not stack on top of each other. They are applied anew -every time. 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, a search with no matches or an extra backspace at the filter prompt (like vi). .Pp -If you want to list all matches starting with the filter expression (a common -use case), start the expression with a +Common examples: If you want to list all matches starting with the filter +expression, start the expression with a .Pa ^ -(caret) symbol. +(caret) symbol. Type +.Pa \.mkv +to list all MKV files. .Pp If .Nm diff --git a/nnn.c b/nnn.c index e3c50919..4cd7d518 100644 --- a/nnn.c +++ b/nnn.c @@ -2010,7 +2010,7 @@ nochange: goto nochange; } - spawn(desktop_manager, path, NULL, path, 2); + spawn(desktop_manager, path, NULL, path, 0b110); break; case SEL_FSIZE: sizeorder = !sizeorder;