JSON preview even without ext
This commit is contained in:
parent
e3284f4b7c
commit
e16dcb713c
@ -338,8 +338,12 @@ handle_mime() {
|
||||
}
|
||||
|
||||
handle_fallback() {
|
||||
if [ "$(file --dereference --brief -- "${FILE_PATH}"| cut -d' ' -f1)" = "JSON" ]; then
|
||||
jq --color-output . "${FILE_PATH}" && exit 5
|
||||
else
|
||||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user