diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-31 01:37:24 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-31 01:38:23 -0800 |
| commit | 6edf6a275574cf8c3cb6a7015e22d0c982e2e489 (patch) | |
| tree | 00626e989a2878501c9bfd340cd3b4db2a07e8e4 /tools/find.nom | |
| parent | 7762c8c45b6f0349d769682b26349fb25a7a8657 (diff) | |
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)
Diffstat (limited to 'tools/find.nom')
| -rwxr-xr-x | tools/find.nom | 4 |
1 files changed, 2 insertions, 2 deletions
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: |
