]> Sergey Matveev's repositories - nnn.git/commitdiff
Prepare for release v1.0
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 13 Apr 2017 13:43:33 +0000 (19:13 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 13 Apr 2017 13:43:33 +0000 (19:13 +0530)
CHANGELOG [new file with mode: 0644]
Makefile
Makefile.generic
README.md
nnn.1
nnn.c

diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644 (file)
index 0000000..c7a0d9a
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,48 @@
+nnn v1.0
+2017-04-13
+
+Modifications
+- Behaviour and navigation
+  - Detail view (default: disabled) with:
+    - file type (directory, regular, symlink etc.)
+    - modification time
+    - human-readable file size
+    - current item in reverse video
+    - number of items in current directory
+    - full name of currently selected file in 'bar'
+  - Show details of the currently selected file (stat, file)
+  - Disk usage analyzer mode (within the same fs, doesn't follow symlinks)
+  - Directories first (even with sorting)
+  - Sort numeric names in numeric order
+  - Case-insensitive alphabetic content listing instead of upper case first
+  - Key `-` to jump to last visited directory
+  - Roll over at the first and last entries of a directory (with Up/Down keys)
+  - Removed navigation restriction with relative paths (and let permissions handle it)
+  - Sort entries by file size (largest to smallest)
+  - Shortcut to invoke file name copier (set using environment variable `NNN_COPIER`)
+- File association
+  - Set `NNN_OPENER` to let a desktop opener handle it all. E.g.:
+        export NNN_OPENER=xdg-open
+        export NNN_OPENER=gnome-open
+        export NNN_OPENER=gvfs-open
+  - Selective file associations (ignored if `NNN_OPENER` is set):
+    - Associate plain text files (determined using file) with vi
+    - Associate common audio and video mimes with mpv
+    - Associate PDF files with [zathura](https://pwmt.org/projects/zathura/)
+    - Removed `less` as default file opener (there is no universal standalone opener utility)
+    - You can customize further (see [how to change file associations](#change-file-associations))
+  - `NNN_FALLBACK_OPENER` is the last line of defense:
+    - If the executable in static file association is missing
+    - If a file type was not handled in static file association
+    - This may be the best option to set your desktop opener to
+  - To enable the desktop file manager key, set `NNN_DE_FILE_MANAGER`. E.g.:
+        export NNN_DE_FILE_MANAGER=thunar
+- Optimization
+  - All redundant buffer removal
+  - All frequently used local chunks now static
+  - Removed some redundant string allocation and manipulation
+  - Simplified some roundabout procedures
+  - Compiler warnings fixed
+  - strip the final binary
+
+-------------------------------------------------------------------------------
index a1dcb6e04549fadbdf182c367395651e676f5f10..4a0e77f3d4356778987e1e1ec19c8a17ae24ee28 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = 0.6
+VERSION = 1.0
 
 PREFIX = /usr/local
 MANPREFIX = $(PREFIX)/man
index 80d4f16118c88bc8916b8125c1b1d57ca5cf9f57..5a656c39429ec6a43263972877cf71c138dce631 100644 (file)
@@ -1,4 +1,4 @@
-VERSION = 0.6
+VERSION = 1.0
 
 PREFIX = /usr/local
 MANPREFIX = $(PREFIX)/man
index 2153cd3c5db26de80c90b09501c9a4754b43ba22..ba2afb24e3bd2accaefcee3442cbffa1275f1f47 100644 (file)
--- a/README.md
+++ b/README.md
@@ -126,9 +126,10 @@ Download the [latest master](https://github.com/jarun/nnn/archive/master.zip) or
 
 Start nnn (default: current directory):
 
-    $ nnn [-d] [path_to_dir]
+    $ nnn [-d] [-v] [path_to_dir]
 
     -d: open in detail view mode
+    -v: show version and exit
 `>` indicates the currently selected entry in nnn.
 
 ### Keyboard shortcuts
diff --git a/nnn.1 b/nnn.1
index bbaaab95a01dcd0d5ffa5b54e92d86891c9e808a..26d535b1892be7b98564d1bfc347bc7a099445d9 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -1,4 +1,4 @@
-.Dd August 21, 2016
+.Dd April 13, 2017
 .Dt NNN 1
 .Os
 .Sh NAME
@@ -82,10 +82,13 @@ Backing up one directory level will set the cursor position at the
 directory you came out of.
 .Pp
 .Nm
-supports the following option:
+supports the following options:
 .Pp
 .Fl d
-        Open in detail view mode.
+        open in detail view mode
+.Pp
+.Fl v
+        show version and exit
 .Sh CONFIGURATION
 .Nm
 is configured by modifying
diff --git a/nnn.c b/nnn.c
index f676eb310e94ee0366e7273eaa85dd1ac7ad50cb..9c8c0609d20a81a1279a1520a297a5c2e2a4ca36 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -53,6 +53,7 @@ xprintf(int fd, const char *fmt, ...)
 #define DPRINTF_P(x)
 #endif /* DEBUG */
 
+#define VERSION "v1.0"
 #define LEN(x) (sizeof(x) / sizeof(*(x)))
 #undef MIN
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
@@ -1577,7 +1578,7 @@ nochange:
 static void
 usage(void)
 {
-       fprintf(stderr, "usage: nnn [-d] [dir]\n");
+       fprintf(stderr, "usage: nnn [-d] [-v] [dir]\n");
        exit(1);
 }
 
@@ -1597,13 +1598,16 @@ main(int argc, char *argv[])
        if (argc > 3)
                usage();
 
-       while ((opt = getopt(argc, argv, "d")) != -1) {
+       while ((opt = getopt(argc, argv, "dv")) != -1) {
                switch (opt) {
                case 'd':
                        /* Open in detail mode, if set */
                        showdetail = 1;
                        printptr = &printent_long;
                        break;
+               case 'v':
+                       fprintf(stderr, "%s\n", VERSION);
+                       return 0;
                default:
                        usage();
                }