mirror of https://github.com/jarun/nnn.git
feat(mimelist): use `mimetype` for better type detection
This commit is contained in:
parent
b43e0bd084
commit
b46d608aa1
|
@ -12,4 +12,8 @@ printf "mime (e.g., video/audio/image): "
|
|||
read -r mime
|
||||
|
||||
printf "%s" "+l" > "$NNN_PIPE"
|
||||
find . | file -if- | grep "$mime" | awk -F: '{printf "%s%c", $1, 0}' > "$NNN_PIPE"
|
||||
if type mimetype >/dev/null 2>&1; then
|
||||
find . | mimetype -f - | grep "$mime" | awk -F: '{printf "%s%c", $1, 0}' > "$NNN_PIPE"
|
||||
else
|
||||
find . | file -if- | grep "$mime" | awk -F: '{printf "%s%c", $1, 0}' > "$NNN_PIPE"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue