]> Sergey Matveev's repositories - nnn.git/commitdiff
Use short options
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 21 Mar 2021 14:03:43 +0000 (19:33 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 21 Mar 2021 14:03:43 +0000 (19:33 +0530)
plugins/nuke
plugins/preview-tabbed
plugins/preview-tui
plugins/preview-tui-ext

index 82869707e37302126d8f974177f3b976dade4632..8a2665f7702943ea7a24333cff2af943fee7e343 100755 (executable)
@@ -510,7 +510,7 @@ handle_blocked() {
     esac
 }
 
-MIMETYPE="$( file --dereference --brief --mime-type -- "${FPATH}" )"
+MIMETYPE="$( file -bL --mime-type -- "${FPATH}" )"
 handle_extension
 handle_multimedia "${MIMETYPE}"
 handle_mime "${MIMETYPE}"
index 5caccb50fe726eeb6ffb44b7414f73db98af89c8..43cb40bb08cf7bff42b0b8aa6a283365d22f80ef 100755 (executable)
@@ -138,7 +138,7 @@ previewer_loop () {
 
         kill_viewer
 
-        MIME="$(file -b --mime-type "$FILE")"
+        MIME="$(file -bL --mime-type "$FILE")"
 
         case "$MIME" in
             video/*)
index f90cf6f877ee02aaadb809c29cd2692913070786..51eb0df2550c666f0235eb4440434b90771c5f5c 100755 (executable)
@@ -137,8 +137,8 @@ preview_file () {
 
     # Detecting the exact type of the file: the encoding, mime type, and
     # extension in lowercase.
-    encoding="$(file -Lb --mime-encoding -- "$1")"
-    mimetype="$(file -Lb --mime-type -- "$1")"
+    encoding="$(file -bL --mime-encoding -- "$1")"
+    mimetype="$(file -bL --mime-type -- "$1")"
     ext="${1##*.}"
     if [ -n "$ext" ]; then
         ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
index b946762fae6bee460a1df6f5782ee5e03cfcf5e6..f49599d7c7c22ef0e31d03953bdcb36fa4dfe832 100755 (executable)
@@ -148,8 +148,8 @@ preview_file () {
 
     # Detecting the exact type of the file: the encoding, mime type, and
     # extension in lowercase.
-    encoding="$(file -Lb --mime-encoding -- "$1")"
-    mimetype="$(file -Lb --mime-type -- "$1")"
+    encoding="$(file -bL --mime-encoding -- "$1")"
+    mimetype="$(file -bL --mime-type -- "$1")"
     ext="${1##*.}"
     if [ -n "$ext" ]; then
         ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"