]> Sergey Matveev's repositories - nnn.git/commitdiff
Add `Y` as selection keybind
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 23 Nov 2018 02:14:32 +0000 (07:44 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 23 Nov 2018 02:14:32 +0000 (07:44 +0530)
README.md
nnn.1
src/nnn.c
src/nnn.h

index c81b91bae5e1c9fa2d3831429e9153f377db647c..ab5eefffae60250c517b6992f8e4299938e25c54 100644 (file)
--- a/README.md
+++ b/README.md
@@ -72,6 +72,7 @@ It runs on Linux, OS X, Raspberry Pi, Cygwin, Linux subsystem for Windows and Te
   - [set idle timeout](#set-idle-timeout)
   - [show hot plugged drives](#show-hot-plugged-drives)
   - [tmux configuration](#tmux-configuration)
+  - [BSD terminal issue](#bsd-terminal-issue)
 - [Why fork?](#why-fork)
 - [Mentions](#mentions)
 - [Developers](#developers)
@@ -226,7 +227,7 @@ Press <kbd>?</kbd> in `nnn` to see the list anytime.
              ^O  Open with...          n  Create new
               D  File details          d  Toggle detail view
              ^R  Rename entry          r  Open dir in vidir
-             ^Y  Toggle selection      y  List selection
+          Y, ^Y  Toggle selection      y  List selection
           ⎵, ^K  Copy entry path      ^T  Toggle path quote
               P  Copy selection        X  Delete selection
               V  Move selection       ^X  Delete entry
@@ -365,10 +366,10 @@ Use <kbd>^K</kbd> to copy the absolute path of the file under the cursor.
 
 To copy multiple absolute file paths:
 
-- press <kbd>^Y</kbd> to enter selection mode. In this mode it's possible to
+- press <kbd>^Y</kbd> (or <kbd>Y</kbd>) to enter selection mode. In this mode it's possible to
   - cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry; or,
   - navigate to another file in the same directory to select a range of files
-- press <kbd>^Y</kbd> _again_ to copy the paths and exit the selection mode
+- press <kbd>^Y</kbd> (or <kbd>Y</kbd>) _again_ to copy the paths and exit the selection mode
 
 The files in the list can now be copied (<kbd>P</kbd>), moved (<kbd>V</kbd>) or removed (<kbd>X</kbd>).
 
@@ -506,7 +507,7 @@ Enable volume management in your DE file manager and set removable drives or med
 
 #### BSD terminal issue
 
-By default in OpenBSD & FreeBSD, `stty` maps `^Y` to `DSUSP`. This means that typing `^Y` will suspend `nnn` as if you typed `^Z` (you can bring `nnn` back to the foreground by issuing `fg`) instead of entering multi-copy mode. You can check this with `stty -a`. If it includes the text "`dsusp = ^Y`", issuing `stty dsusp undef` will disable this `DSUSP` and let `nnn` receive the `^Y` instead.
+By default in OpenBSD & FreeBSD, `stty` maps <kbd>^Y</kbd> to `DSUSP`. This means that typing <kbd>^Y</kbd> will suspend `nnn` as if you typed <kbd>^Z</kbd> (you can bring `nnn` back to the foreground by issuing `fg`) instead of entering multi-copy mode. You can check this with `stty -a`. If it includes the text "`dsusp = ^Y`", issuing `stty dsusp undef` will disable this `DSUSP` and let `nnn` receive the <kbd>^Y</kbd> instead.
 
 #### WHY FORK?
 
diff --git a/nnn.1 b/nnn.1
index 75b97784adf809e5b2ba6079c7033f34c622c63d..14b90c619d6623f94cd471886d9c781169320f3e 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -96,7 +96,7 @@ Toggle detail view
 Rename selected entry
 .It Ic r
 Open directory in vidir
-.It Ic ^Y
+.It Ic Y, ^Y
 Toggle selection mode
 .It Ic Space, ^K
 Copy entry absolute path
index 717628d5e09493e5b924b3d3df0462b8d8236724..5175f63a6a89bbe6ec9a5c37c8667499b4f3fe9a 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1977,7 +1977,7 @@ static int show_help(char *path)
             "d^O  Open with...          n  Create new\n"
              "eD  File details          d  Toggle detail view\n"
             "d^R  Rename entry          r  Open dir in vidir\n"
-            "d^Y  Toggle selection      y  List selection\n"
+         "aY, ^Y  Toggle selection      y  List selection\n"
          "a⎵, ^K  Copy entry path      ^T  Toggle path quote\n"
              "eP  Copy selection        X  Delete selection\n"
              "eV  Move selection       ^X  Delete entry\n"
index d4e0506d8da4c753ecb1d0742faf11e0fc4d272c..9ddccb051d97eb50357a3dff6bfc2af9212af758 100644 (file)
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -195,6 +195,7 @@ static struct key bindings[] = {
        { ' ',            SEL_COPY,      "",     "" },
        /* Toggle copy multiple file paths */
        { CONTROL('Y'),   SEL_COPYMUL,   "",     "" },
+       { 'Y',            SEL_COPYMUL,   "",     "" },
        /* Show list of copied files */
        { 'y',            SEL_COPYLIST,  "",     "" },
        /* Copy from copy buffer */