]> Sergey Matveev's repositories - nnn.git/commitdiff
Remove redundant examples
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 6 Jun 2021 16:46:24 +0000 (22:16 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 6 Jun 2021 16:46:24 +0000 (22:16 +0530)
nnn.1
plugins/README.md

diff --git a/nnn.1 b/nnn.1
index b1dab368d581321c788ffd8a6b97efa7e12516bf..bd054c39388541f0b3fd7d08bdfeef1e9ae55c75 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -414,7 +414,7 @@ separated by \fI;\fR:
        Note: This option is incompatible with \fB&\fR (terminal output is masked
        for GUI programs) and ignores \fB*\fR (output is already paged for user)
 
-        export NNN_PLUG='m:-!|mediainfo $nnn'
+        export NNN_PLUG='m:-!|mediainfo $nnn;t:-!|tree -ps;l:-!|ls -lah --group-directories-first'
 
     EXAMPLES:
     ----------------------------------- + -------------------------------------------------
index dd7ca14b6f36fb91d028cacfee889c9bed1d8240..1f1527ada092312967342d62b2caa02159a139ca 100644 (file)
@@ -155,7 +155,7 @@ export NNN_PLUG='m:-!&mousepad $nnn'
 To show the output of run-to-completion commands which do not need user input, add `|` (pipe) after `!`.
 
 ```sh
-export NNN_PLUG='m:-!|mediainfo $nnn'
+export NNN_PLUG='m:-!|mediainfo $nnn;t:-!|tree -ps;l:-!|ls -lah --group-directories-first'
 ```
 
 This option is incompatible with `&` (terminal output is masked for GUI programs) and ignores `*` (output is already paged for user).
@@ -323,62 +323,6 @@ if [ -n "$pattern" ]; then
 fi
 ```
 
-#### Quick scripts for paged output
-
-```sh
-#!/usr/bin/env sh
-
-# Show media information for hovered file
-# Save as file mediainf
-# m:-!mediainf
-
-mediainfo "$1" | eval "$PAGER"
-# exiftool "$1" | $PAGER
--------------------------------------------------
-#!/usr/bin/env sh
-
-# Show tree output with permissions and file size
-# Save as file treeplug
-# t:-!treeplug
-
-tree -ps | $EDITOR -
--------------------------------------------------
-#!/usr/bin/env sh
-
-# List files with UID/GID
-# Save as file uidgid
-# u:-!uidgid
-
-ls -lah --group-directories-first | less
--------------------------------------------------
-#!/usr/bin/env sh
-
-# Show hovered file data in hex
-# Save as file hexview
-# x:-!hexview
-
-if [ -f "$1" ]; then
-    xxd "$1" | $PAGER
-fi
--------------------------------------------------
-#!/usr/bin/env sh
-
-# Show hovered PDF text
-# Save as file pdftxt
-# p:-!pdftxt
-
-if [ -f "$1" ] && [ "$(head -c 4 "$1")" = "%PDF" ]; then
-    pdftotext -nopgbrk -layout "$1" - | sed 's/\xe2\x80\x8b//g' | $PAGER
-
-    # Convert using mutool
-    # file=`basename "$1"`
-    # txt=/tmp/"$file".txt
-    # mutool convert -o "$txt" "$1"
-    # eval $PAGER $txt
-    # rm "$txt
-fi
-```
-
 ## Contributing plugins
 
 1. Add informative sections like _Description_, _Notes_, _Dependencies_, _Shell_, _Author_ etc. in the plugin.