aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.1
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-10 18:00:52 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-10 18:30:59 +0530
commitf93bb79de81d683125fd41cb9b139bf1539f5b57 (patch)
tree96d0b19e65333f2657f0509eeb1da663dafce776 /nnn.1
parentb3f8e4e511fc63abc5c2fdbe3a38c00f56cae122 (diff)
downloadnnn-f93bb79de81d683125fd41cb9b139bf1539f5b57.tar.gz
Update docs
Diffstat (limited to 'nnn.1')
-rw-r--r--nnn.110
1 files changed, 10 insertions, 0 deletions
diff --git a/nnn.1 b/nnn.1
index 2ab10bf..69efdcf 100644
--- a/nnn.1
+++ b/nnn.1
@@ -280,6 +280,16 @@ or redirect a list from a file:
nnn < files.txt
.Ed
.Pp
+Handy bash/zsh shell function to list files by mime-type in current directory:
+.Bd -literal
+ # to show video files, run: list video
+
+ list ()
+ {
+ find . -maxdepth 1 | file -if- | grep "$1" | awk -F: '{printf "%s\0", $1}' | nnn
+ }
+.Ed
+.Pp
A temporary directory will be created containing symlinks to the given
paths. Any action performed on these symlinks will be performed only on their
targets, after which they might become invalid.