This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Launches files based on their mimetypes | |
# Usage: launch [FILE...] | |
# Dependencies: file | |
case $(file --mime-type "$@" -bL) in | |
# Check for the mimetype of your file (This is POSIX regex) | |
video/* | audio/* | image/gif) | |
# Launch using your favorite application |