]> Sergey Matveev's repositories - nnn.git/commitdiff
Uniform plugins
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 6 May 2020 05:12:29 +0000 (10:42 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 6 May 2020 05:12:50 +0000 (10:42 +0530)
13 files changed:
README.md
plugins/chksum
plugins/dragdrop
plugins/dups
plugins/getplugs
plugins/mocplay
plugins/nbak
plugins/picker
plugins/preview-tabbed
plugins/preview-tui
plugins/uidgid
plugins/upgrade
plugins/x2sel

index 0474d8bafe9d84f246c45ff58bfd528fbfaa42d6..653ddd77361658bcad37be1cf7f6125b44ab2ceb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -135,8 +135,9 @@ Don't memorize! Arrows (or <kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd>),
 - [0xACE](https://github.com/0xACE)
 - [Anna Arad](https://github.com/annagrram)
 - [KlzXS](https://github.com/KlzXS)
-- [leovilok](https://github.com/leovilok)
+- [Léo Villeveygoux](https://github.com/leovilok)
 - [Maxim Baz](https://github.com/maximbaz)
+- [Todd Yamakawa](https://github.com/toddyamakawa)
 - and other contributors
 
 Visit the [ToDo list](https://github.com/jarun/nnn/issues/506) to contribute or see the features in progress.
index 1514de7222b8b9d9387acfe40f9b62ec54ac9ea8..0a386e5a12dcac2d2374b5026d6df20f20e1aa7c 100755 (executable)
@@ -12,7 +12,7 @@
 #                the output checksum filename will be directory.checksum_type
 #
 # Shell: POSIX compliant
-# Author: ath3, Arun Prakash Jana
+# Authors: ath3, Arun Prakash Jana
 
 selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
 resp=f
index bc01d870ac0261d8fa1bc5bdc1859a0e2c7c7a55..5734d98e5f5fb1cc3b5df5130702f973603cc725 100755 (executable)
@@ -1,15 +1,16 @@
 #!/usr/bin/env sh
 
 # Description: Open a Drag and drop window, to drop files onto other programs.
-# Also provides drag and drop window for files.
+#              Also provides drag and drop window for files.
 #
-# Files that are dropped will be added to nnn's selection
-# Some webbased files will be downloaded to current directory with curl
-# and it may overwrite some existing files
+# Requires: https://github.com/mwh/dragon
 #
-# The user has to mm to clear nnn's selection first
+# Notes:
+# - Files that are dropped will be added to nnn's selection
+#   Some webbased files will be downloaded to current directory with curl
+#   and it may overwrite some existing files
+# - The user has to mm to clear nnn's selection first
 #
-# Dependency: https://github.com/mwh/dragon
 # Shell: POSIX compliant
 # Author: 0xACE
 
index c35489c6ddd7f72136fa06ba7462f69f572bc58f..d44ecfcf6df1494970ef072b8b5b73b7327c01c4 100755 (executable)
@@ -7,7 +7,7 @@
 # Requires: find md5sum sort uniq xargs
 #
 # Shell: POSIX compliant
-# Author: syssyphus, KlzXS
+# Authors: syssyphus, KlzXS
 
 find . -size +0 -type f -printf "%s %p\n" | sort -rn | sed -n 'N; /^\([0-9]*\) .*\n\1.*$/p;$d;D' | awk '{printf("%s\0", substr($0, index($0, $2)))}' | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
 
index 2dfc00276c8616f7c0cfa2e9e7272eae8e480589..0c68be07579eadc85e8ce4a493169f081c7fe7d7 100755 (executable)
@@ -3,7 +3,7 @@
 # Description: Update nnn plugins to installed nnn version
 #
 # Shell: POSIX compliant
-# Author: Arun Prakash Jana, KlzXS
+# Authors: Arun Prakash Jana, KlzXS
 
 CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/
 PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins
index 6739c55681bb7c0841127c52378925182e6b26a5..39c7c9ad937427dd50176813ced3fb2193d8d385 100755 (executable)
@@ -8,7 +8,7 @@
 # - to let mocp shuffle tracks, set SHUFFLE=1
 #
 # Shell: POSIX compliant
-# Author: Arun Prakash Jana, ath3
+# Authors: Arun Prakash Jana, ath3
 
 IFS="$(printf '\n\r')"
 selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
index 8ff5474c0273fe5b5984e55adfac4b41ddc5137f..f9cb64492d6e84a7339c923dd3b57386e5e939b7 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/env sh
 
-# Description: Backup of all nnn config
+# Description: Backup nnn configuration
+#              - config dir content
+#              - environment config
+#              - shell functions and aliases
 #
 # Shell: POSIX compliant
 # Author: Léo Villeveygoux
@@ -70,4 +73,3 @@ printf "Saving as '%s' ... " "$workdir/$outfile"
 tar caf "$workdir/$outfile" "$outdir" && echo "Done" || echo "Failed"
 
 cd "$workdir" && rm -rf "$tempdir"
-
index 91101fea1b4375e6bb9feae6703ab9aa73a526fb..93acca54622feb0262c3e72c80d0f5f3fc32ba9b 100755 (executable)
@@ -2,21 +2,21 @@
 
 # Description: Pick files and pipe the newline-separated list to another utility
 #
-# Shell: POSIX compliant
-# Author: Arun Prakash Jana
-#
 # Usage:
-# Copy this file in your $PATH, make it executable and preferably name it to picker.
-# Run commands like:
-#   ls -l `picker`
-#   cd `picker`
-#   vimdiff `picker`
-# or, in fish shell:
-#   ls -l (picker)
-#   cd (picker)
-#   vimdiff (picker)
+#   Copy this file in your $PATH, make it executable and preferably name it to picker.
+#   Run commands like:
+#     ls -l `picker`
+#     cd `picker`
+#     vimdiff `picker`
+#   or, in fish shell:
+#     ls -l (picker)
+#     cd (picker)
+#     vimdiff (picker)
 #
-# NOTE: This use case is limited to picking files, other functionality may not work as expected.
+# Note: This use case is limited to picking files, other functionality may not work as expected.
+#
+# Shell: POSIX compliant
+# Author: Arun Prakash Jana
 
 nnn -p /tmp/picked
 
index 7e7e8400bb884099938d8f0720c6b7d1e246776f..b5b5f052239983bde26a0788ecc5bd7c467da9ec 100755 (executable)
@@ -1,11 +1,9 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Description: tabbed/xembed based file previewer
 #
 # Note: This plugin needs a "NNN_FIFO" to work. See man.
 #
-# Shell: Bash (job control is weakly specified in POSIX)
-#
 # Dependencies:
 #  - tabbed (https://tools.suckless.org/tabbed): xembed host
 #  - xterm (or urxvt or st) : xembed client for text-based preview
@@ -46,6 +44,7 @@
 # [1]: http://tools.suckless.org/tabbed/
 # [2]: https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html
 #
+# Shell: bash (job control is weakly specified in POSIX)
 # Author: leovilok
 
 
index 0c50390ebaa6aa686e5aa891b0812db181d81d53..17b529bf6920fb5f80fa8396ecabeb3b6e282856 100755 (executable)
@@ -6,7 +6,7 @@
 #
 # Dependencies: tmux (>=3.0) or xterm (or set $TERMINAL), file, tree
 #
-# How to use:
+# Usage:
 #   You need to set a NNN_FIFO path and set a key for the plugin,
 #   then start `nnn`:
 #
@@ -18,7 +18,8 @@
 #   single common preview window. I you provide different FIFO path, they
 #   will be independent.
 #
-# Authors: Todd Yamakawa and Léo Villeveygoux
+# Shell: POSIX compliant
+# Authors: Todd Yamakawa, Léo Villeveygoux
 
 TERMINAL="${TERMINAL:-xterm}"
 
index a73acae03e7f30b13a62a9c78045945976c815f4..8e0b197ee12661e65d50c19f2c325cf9bed250f7 100755 (executable)
@@ -3,7 +3,7 @@
 # Description: list uid and gid of files
 #
 # Shell: POSIX compliant
-# Author: Arun Prakash Jana, superDuperCyberTechno
+# Authors: Arun Prakash Jana, superDuperCyberTechno
 
 # shellcheck disable=SC2012
 ls -lah --group-directories-first | less
index d166991979a9170a3382376bf5ab1163c5c09104..b2170f7be508df26c3a9f38f5e478ba1148c8b79 100755 (executable)
@@ -2,9 +2,10 @@
 
 # Description: Check and update to latest version of nnn manually on Debian 9 Stretch
 #
+# Note: This script installs a package, should be issued with admin privilege
+#
 # Shell: POSIX-compliant
 # Author: Arun Prakash Jana
-# NOTE: This script installs a package, should be issued with admin privilege
 
 cur="$(nnn -v)"
 new="$(curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+")"
index 79856eb1453ac5d7f9aec2aebcf72fd638636617..88f9dcc5d0b2b5395eb5e972825293e16746ff91 100755 (executable)
@@ -9,7 +9,7 @@
 #           cygwim's /dev/clipboard (Cygwin)
 #           wl-paste (Wayland)
 #
-# LIMITATION: breaks if a filename has newline in it
+# Limitation: breaks if a filename has newline in it
 #
 # Shell: POSIX compliant
 # Author: Léo Villeveygoux, after Arun Prakash Jana's .cbcp