From 6edf6a275574cf8c3cb6a7015e22d0c982e2e489 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 31 Dec 2018 01:37:24 -0800 Subject: Overhaul of command line argument parsing. Now supports "-abc" as 3 flags, and stores them as .a, .b, .c instead of ."-a", etc. (same for --args) --- tools/find.nom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/find.nom') diff --git a/tools/find.nom b/tools/find.nom index d07681a..781ca3f 100755 --- a/tools/find.nom +++ b/tools/find.nom @@ -21,7 +21,7 @@ use "lib/consolecolor.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -$wildcard = ($(COMMAND LINE ARGS)."--wildcard" or "%*") +$wildcard = ($(COMMAND LINE ARGS).wildcard or "%*") $pattern = $(COMMAND LINE ARGS).extras.1 if (any of [not $pattern, $pattern == "*", $pattern == "**"]): barf (" @@ -84,7 +84,7 @@ for $filename in $filenames: if ($sub is syntax tree): recurse $t on $sub - if $(COMMAND LINE ARGS)."-l": + if $(COMMAND LINE ARGS).l: if ((#$results) > 0): say $filename ..else: -- cgit v1.2.3