Files
would-reformat/_reformat-common.sh
Michael Wolf 10ffb93f4e Allow for html
2020-05-25 07:53:11 -05:00

24 lines
522 B
Bash

function sniff_file_type () {
ff=$1
shift
file_type=
if [[ $ff == *.py ]] ; then
file_type="python"
elif [[ $ff == *.js ]] ; then
file_type="javascript"
elif [[ $ff == *.ts ]] ; then
file_type="typescript"
elif [[ $ff == *.vue ]] ; then
file_type="vue"
elif [[ $ff == *.css ]] ; then
file_type="css"
elif [[ $ff == *.php ]] ; then
file_type="php"
elif [[ $ff == *.html ]] ; then
file_type="html"
fi
echo $file_type
}