aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2020-03-04 23:22:31 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2020-03-04 23:22:31 +0100
commita8853078e863cb1b16551364ea689a39a4673c34 (patch)
tree4918dc7a3d55b4ba70f6331d0469fbf86117e403 /files
parentbb3cf4d235ca41e265ed0e5508a2ddf02e8389a1 (diff)
downloadconfigs-a8853078e863cb1b16551364ea689a39a4673c34.tar.gz
configs-a8853078e863cb1b16551364ea689a39a4673c34.zip
Added json files preview to ranger's scope.sh.
Diffstat (limited to 'files')
-rwxr-xr-xfiles/ranger/scope.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/files/ranger/scope.sh b/files/ranger/scope.sh
index fdb6e91..8ba84e0 100755
--- a/files/ranger/scope.sh
+++ b/files/ranger/scope.sh
@@ -93,6 +93,10 @@ case "$extension" in
try lynx -dump "$path" && { dump | trim | fmt -s -w "$width;" exit 4; }
try elinks -dump "$path" && { dump | trim | fmt -s -w "$width;" exit 4; }
;; # fall back to highlight/cat if the text browsers fail
+ # Plain text files:
+ json)
+ mimetype="text/" # Fix so it calls as if it had text mimetype
+
esac
case "$mimetype" in