aboutsummaryrefslogtreecommitdiff
path: root/bin/uri
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-08-15 16:29:42 -0300
committerEuAndreh <eu@euandre.org>2022-08-15 16:29:42 -0300
commitc9701a0753f2dd064f0243a494cad56a6bb641be (patch)
tree842eae57995a7c1814df628df6aadc6cf6dd533b /bin/uri
parentbin/uri: Use single quote over double quote (diff)
downloaddotfiles-c9701a0753f2dd064f0243a494cad56a6bb641be.tar.gz
dotfiles-c9701a0753f2dd064f0243a494cad56a6bb641be.tar.xz
bin/uri: Fail when bad option is given
Diffstat (limited to 'bin/uri')
-rwxr-xr-xbin/uri5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/uri b/bin/uri
index 5466c09..4e57f7c 100755
--- a/bin/uri
+++ b/bin/uri
@@ -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;