]> Sergey Matveev's repositories - nnn.git/commitdiff
Add F12 as run plugin key:wq
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 25 Aug 2019 14:18:08 +0000 (19:48 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 25 Aug 2019 14:18:08 +0000 (19:48 +0530)
README.md
src/nnn.c
src/nnn.h

index f921ddacf63cd6a443dce6ab6092d2a83842a2bd..3e40ff9854b3f043fdddec800b18ad4f447d0e3d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -261,7 +261,7 @@ Press <kbd>?</kbd> in `nnn` to see the list anytime.
             s  Size    E  Extn   t  Time modified
  MISC
          ! ^]  Shell   L  Lock   C  Execute entry
-         R ^V  Pick plugin      xK  Run plugin key K
+         R ^V  Pick plugin  F12 xK  Run plugin key K
             c  SSHFS mount       u  Unmount
            ^P  Prompt  ^N  Note  =  Launcher
 ```
index 956f586d504086f2752436c32c23ae9feda57ccf..e7944ad86b297c4990ea81d1853ffadc02b1ab62 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -927,12 +927,8 @@ static bool initcurses(mmask_t *oldmask)
                        return FALSE;
                }
        } else if (!initscr()) {
-               char *term = getenv("TERM");
-
-               if (term)
-                       fprintf(stderr, "error opening TERM: %s\n", term);
-               else
-                       fprintf(stderr, "initscr!\n");
+               fprintf(stderr, "initscr!\n");
+               DPRINTF_S(getenv("TERM"));
                return FALSE;
        }
 
@@ -2847,7 +2843,7 @@ static bool show_help(const char *path)
                  "cs  Size    E  Extn   t  Time modified\n"
                "1MISC\n"
               "9! ^]  Shell   L  Lock   C  Execute entry\n"
-              "9R ^V  Pick plugin      xK  Run plugin key K\n"
+              "9R ^V  Pick plugin  F12 xK  Run plugin key K\n"
                  "cc  SSHFS mount       u  Unmount\n"
                 "b^P  Prompt  ^N  Note  =  Launcher\n"};
 
index c68893ac5a528f78369fdc25cdf04803a2cd92f2..9732ad9bf6eee828ac6b79edb445e499a370bd60 100644 (file)
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -241,6 +241,7 @@ static struct key bindings[] = {
        { CONTROL(']'),   SEL_SHELL },
        /* Plugin key */
        { 'x',            SEL_PLUGKEY },
+       { KEY_F(12),      SEL_PLUGKEY },
        /* Run a plugin */
        { 'R',            SEL_PLUGIN },
        { CONTROL('V'),   SEL_PLUGIN },