scripts/nope
joachimschmidt557 0973bb4f7f Help pages
2019-06-23 18:05:08 +02:00

37 lines
463 B
Bash
Executable file

#!/bin/sh
usage() {
cat <<EOF
nope
opens files
Usage: nope FILE
Flags:
--help, -h Displays this help
--version, -v Show version and exit
EOF
}
case "$@" in
--help)
usage
exit 1
;;
--version)
echo "nope version 0.1.0"
;;
*.pdf)
okular "$@" > /dev/null 2>&1 &
;;
*.html)
firefox "$@" > /dev/null 2>&1 &
;;
*.mp4|*.mp3)
vlc "$@" > /dev/null 2>&1 &
;;
*)
echo "No rule for opening this file has been specified"
exit 1
;;
esac