aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mimelist
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-03 16:16:14 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-03 16:25:59 +0530
commitebb6f153b51332ce2b64b3e717ea956484749d4c (patch)
treefb798e3b34d5120292b9aa53f3cd2f9c3e4d19c7 /plugins/mimelist
parent3f60a1931f1e51c8e90516dd7e716244da7f42e7 (diff)
downloadnnn-ebb6f153b51332ce2b64b3e717ea956484749d4c.tar.gz
Context code '+' to create context smartly
Diffstat (limited to 'plugins/mimelist')
-rwxr-xr-xplugins/mimelist4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mimelist b/plugins/mimelist
index 0ec7c0f..5635afd 100755
--- a/plugins/mimelist
+++ b/plugins/mimelist
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
-# Description: Run fd/find in subtree and list files by mime type in current context
+# Description: Run fd/find in subtree and list files by mime type in smart context
# Requires: fd/find
#
# Shell: POSIX compliant
@@ -17,5 +17,5 @@ fi
printf "mime: "
read -r mime
-printf "%s" "0l" > "$NNN_PIPE"
+printf "%s" "+l" > "$NNN_PIPE"
$fd | file -if- | grep "$mime" | awk -F: '{printf "%s\0", $1}' > "$NNN_PIPE"