summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-07-09 14:52:11 -0400
committerLuke Smith <luke@lukesmith.xyz>2018-07-09 14:52:11 -0400
commit435a70d5b92fcc5c0c231befd0516fa1228da436 (patch)
tree75518d91f774e9620b90cfa144f445421a97238c
parent48a1c36733f0c466d008a8c13fc1182cb02b1fea (diff)
downloadeibhear-435a70d5b92fcc5c0c231befd0516fa1228da436.tar.gz
eibhear-435a70d5b92fcc5c0c231befd0516fa1228da436.tar.zst
eibhear-435a70d5b92fcc5c0c231befd0516fa1228da436.zip
primitive csv preview added
-rwxr-xr-x.config/ranger/scope.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/.config/ranger/scope.sh b/.config/ranger/scope.sh
index 34e7fb1..feef291 100755
--- a/.config/ranger/scope.sh
+++ b/.config/ranger/scope.sh
@@ -67,6 +67,8 @@ case "$extension" in
try acat "$path" && { dump | trim; exit 3; }
try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;;
+ csv)
+ sed "s/\(.*\".*\),\(.*\".*\)/\1~\2/;s/,/\t/g;s/~/,/g;s/\t\"/\t/g;s/\"\t/\t/g" "$path" && { dump| trim; exit 0; } || exit 1;;
rar)
# avoid password prompt by providing empty password
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;