]> Sergey Matveev's repositories - nnn.git/commitdiff
Show notifier only for associations
authorArun Prakash Jana <engineerarun@gmail.com>
Tue, 4 Apr 2017 14:27:44 +0000 (19:57 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 6 Apr 2017 00:59:00 +0000 (06:29 +0530)
README.md
nnn.1
nnn.c

index 59fa860bc0c61b14167228fbf863f68dfa19244e..70e85be43364b0e5e1148854a9b82ae7ddadd97e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
 
 Noice is Not Noice, a noicer fork...
 
+[![nnn_demo.gif](http://s23.postimg.org/fjmcngsux/nnn_demo.gif)](http://postimg.org/image/6olicy42f/)
+
 ### Table of Contents
 
 - [Introduction](#introduction)
@@ -143,7 +145,9 @@ Start nnn (default: current directory):
 
 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.
 
-Filters do not stack on top of each other. They are applied anew every time. An empty filter expression resets the filter.
+Filters do not stack on top of each other. They are applied anew every time.
+
+An empty filter expression resets the filter.
 
 If nnn is invoked as root the default filter will also match hidden files.
 
diff --git a/nnn.1 b/nnn.1
index 7de14232bf6f3aaadb4ce30e9d1f03d58fd576f1..100b66a137b234780f267a095634800af2431ab3 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -105,7 +105,7 @@ searching through the directory tree for a particular entry.
 Filters do not stack on top of each other.  They are applied anew
 every time.
 .Pp
-To reset the filter you can input an empty filter expression.
+An empty filter expression resets the filter.
 .Pp
 If
 .Nm
diff --git a/nnn.c b/nnn.c
index 5256c5d3a4d3fd3bc304a71696d9b1ccdf8a73d4..9cfbc982d3aa2f6467b14eb547b69fae0f1879ad 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -274,7 +274,7 @@ xdirname(const char *path)
 }
 
 static void
-spawn(char *file, char *arg, char *dir)
+spawn(char *file, char *arg, char *dir, int notify)
 {
        pid_t pid;
        int status;
@@ -283,7 +283,8 @@ spawn(char *file, char *arg, char *dir)
        if (pid == 0) {
                if (dir != NULL)
                        status = chdir(dir);
-               fprintf(stdout, "\n +-++-++-+\n | n n n |\n +-++-++-+\n\n");
+               if (notify)
+                       fprintf(stdout, "\n +-++-++-+\n | n n n |\n +-++-++-+\n\n");
                execlp(file, file, arg, NULL);
                _exit(1);
        } else {
@@ -1186,7 +1187,7 @@ nochange:
                                        }
                                }
                                exitcurses();
-                               spawn(bin, newpath, NULL);
+                               spawn(bin, newpath, NULL, 1);
                                initcurses();
                                continue;
                        }
@@ -1328,7 +1329,7 @@ nochange:
                                else
                                        snprintf(abspath, PATH_MAX, "%s/%s",
                                                 path, dents[cur].name);
-                               spawn(copier, abspath, NULL);
+                               spawn(copier, abspath, NULL, 0);
                                printmsg(abspath);
                        } else if (!copier)
                                        printmsg("NNN_COPIER is not set");
@@ -1342,14 +1343,14 @@ nochange:
                case SEL_RUN:
                        run = xgetenv(env, run);
                        exitcurses();
-                       spawn(run, NULL, path);
+                       spawn(run, NULL, path, 0);
                        initcurses();
                        /* Re-populate as directory content may have changed */
                        goto begin;
                case SEL_RUNARG:
                        run = xgetenv(env, run);
                        exitcurses();
-                       spawn(run, dents[cur].name, path);
+                       spawn(run, dents[cur].name, path, 0);
                        initcurses();
                        break;
                }
@@ -1357,7 +1358,7 @@ nochange:
                if (idletimeout != 0 && idle == idletimeout) {
                        idle = 0;
                        exitcurses();
-                       spawn(idlecmd, NULL, NULL);
+                       spawn(idlecmd, NULL, NULL, 0);
                        initcurses();
                }
        }