diff options
author | EuAndreh <eu@euandre.org> | 2022-08-15 16:29:42 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-08-15 16:29:42 -0300 |
commit | c9701a0753f2dd064f0243a494cad56a6bb641be (patch) | |
tree | 842eae57995a7c1814df628df6aadc6cf6dd533b | |
parent | bin/uri: Use single quote over double quote (diff) | |
download | dotfiles-c9701a0753f2dd064f0243a494cad56a6bb641be.tar.gz dotfiles-c9701a0753f2dd064f0243a494cad56a6bb641be.tar.xz |
bin/uri: Fail when bad option is given
-rwxr-xr-x | bin/uri | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -51,7 +51,10 @@ for (@ARGV) { } my %opts; -Getopt::Std::getopts('edh', \%opts); +if (!Getopt::Std::getopts('edh', \%opts)) { + usage *STDERR; + exit 2; +} if ($opts{h}) { usage *STDOUT; |