From d1a9a76687865a90dd942feaabb46d4c0a0c9d26 Mon Sep 17 00:00:00 2001 From: Emily Frost Date: Tue, 29 Jun 2021 11:44:04 -0500 Subject: [PATCH] Added a really simple help option. --- nyan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))