diff --git a/nyan b/nyan index 91b5af5..750d821 100755 --- a/nyan +++ b/nyan @@ -1,8 +1,7 @@ #!/bin/bash -optstring="o:" +optstring="o:h" declare -i abort=0 -# TODO: Add help option to display usage. # TODO: Consider a switch for per-file progress bars rather than a whole-operation one. if [ ! -e "$(which pv)" ]; then @@ -14,6 +13,7 @@ while getopts ${optstring} args; do case $args in o) output_file=${OPTARG} ;; :) echo "Output file required." ;; + h) echo "Usage: nyan -o [OUTPUT FILE] [INPUT FILE]..." && exit 0 ;; esac done shift $((OPTIND-1))