primitive csv preview added

This commit is contained in:
Luke Smith 2018-07-09 14:52:11 -04:00
parent 48a1c36733
commit 435a70d5b9

View file

@ -67,6 +67,8 @@ case "$extension" in
try acat "$path" && { dump | trim; exit 3; } try acat "$path" && { dump | trim; exit 3; }
try bsdtar -lf "$path" && { dump | trim; exit 0; } try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;; 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) rar)
# avoid password prompt by providing empty password # avoid password prompt by providing empty password
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;; try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;