Remove redundant examples

This commit is contained in:
Arun Prakash Jana 2021-06-06 22:16:24 +05:30
parent 15eed29227
commit 51ac3d02c9
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 2 additions and 58 deletions

2
nnn.1
View File

@ -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:
----------------------------------- + -------------------------------------------------

View 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.