mirror of
https://github.com/jarun/nnn.git
synced 2024-11-05 01:20:18 +03:00
Use short options
This commit is contained in:
parent
73a54e7550
commit
2f6046e6da
@ -510,7 +510,7 @@ handle_blocked() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FPATH}" )"
|
MIMETYPE="$( file -bL --mime-type -- "${FPATH}" )"
|
||||||
handle_extension
|
handle_extension
|
||||||
handle_multimedia "${MIMETYPE}"
|
handle_multimedia "${MIMETYPE}"
|
||||||
handle_mime "${MIMETYPE}"
|
handle_mime "${MIMETYPE}"
|
||||||
|
@ -138,7 +138,7 @@ previewer_loop () {
|
|||||||
|
|
||||||
kill_viewer
|
kill_viewer
|
||||||
|
|
||||||
MIME="$(file -b --mime-type "$FILE")"
|
MIME="$(file -bL --mime-type "$FILE")"
|
||||||
|
|
||||||
case "$MIME" in
|
case "$MIME" in
|
||||||
video/*)
|
video/*)
|
||||||
|
@ -137,8 +137,8 @@ preview_file () {
|
|||||||
|
|
||||||
# Detecting the exact type of the file: the encoding, mime type, and
|
# Detecting the exact type of the file: the encoding, mime type, and
|
||||||
# extension in lowercase.
|
# extension in lowercase.
|
||||||
encoding="$(file -Lb --mime-encoding -- "$1")"
|
encoding="$(file -bL --mime-encoding -- "$1")"
|
||||||
mimetype="$(file -Lb --mime-type -- "$1")"
|
mimetype="$(file -bL --mime-type -- "$1")"
|
||||||
ext="${1##*.}"
|
ext="${1##*.}"
|
||||||
if [ -n "$ext" ]; then
|
if [ -n "$ext" ]; then
|
||||||
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
|
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
@ -148,8 +148,8 @@ preview_file () {
|
|||||||
|
|
||||||
# Detecting the exact type of the file: the encoding, mime type, and
|
# Detecting the exact type of the file: the encoding, mime type, and
|
||||||
# extension in lowercase.
|
# extension in lowercase.
|
||||||
encoding="$(file -Lb --mime-encoding -- "$1")"
|
encoding="$(file -bL --mime-encoding -- "$1")"
|
||||||
mimetype="$(file -Lb --mime-type -- "$1")"
|
mimetype="$(file -bL --mime-type -- "$1")"
|
||||||
ext="${1##*.}"
|
ext="${1##*.}"
|
||||||
if [ -n "$ext" ]; then
|
if [ -n "$ext" ]; then
|
||||||
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
|
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
Loading…
Reference in New Issue
Block a user