From 51ac3d02c9e3f305a44323bfacdf8c205a30299d Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sun, 6 Jun 2021 22:16:24 +0530 Subject: [PATCH] Remove redundant examples --- nnn.1 | 2 +- plugins/README.md | 58 +---------------------------------------------- 2 files changed, 2 insertions(+), 58 deletions(-) diff --git a/nnn.1 b/nnn.1 index b1dab368..bd054c39 100644 --- 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: ----------------------------------- + ------------------------------------------------- diff --git a/plugins/README.md b/plugins/README.md index dd7ca14b..1f1527ad 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -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.