lf - add application/javascript mimetype to open js files with $EDITOR

This commit is contained in:
raaed 2024-05-10 00:17:00 +05:30 committed by GitHub
parent cf4a12acb3
commit cabe2344c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,7 @@ cmd open ${{
case $(file --mime-type "$(readlink -f $f)" -b) in
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
text/*|application/json|application/javascript|inode/x-empty|application/x-subrip) $EDITOR $fx;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$" |