mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Remove redundant examples
This commit is contained in:
parent
15eed29227
commit
51ac3d02c9
2
nnn.1
2
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:
|
||||
----------------------------------- + -------------------------------------------------
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue