#!/bin/bash # try to use the right browser # path of file URL="$1" # get domain name URL="${URL#*://}" URL=${URL%%/*} case $URL in www.youtube.com | youtube.com | youtu.be ) echo "Video loading, please wait..." mpv --really-quiet --no-terminal "$1" ;; www.diplomatie.gouv.fr ) rdrview -T title,body -B cha "$1" ;; *) cha "$1" ;; esac