about summary refs log tree commit diff stats
path: root/lib/Octans/CLI.rakumod
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Octans/CLI.rakumod')
-rw-r--r--lib/Octans/CLI.rakumod5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Octans/CLI.rakumod b/lib/Octans/CLI.rakumod
index 075a57f..04e1b5d 100644
--- a/lib/Octans/CLI.rakumod
+++ b/lib/Octans/CLI.rakumod
@@ -12,6 +12,7 @@ multi sub MAIN (
     Str $path?, #= path to the crossword (file or url)
     Str :$dict = (%?RESOURCES<mwords/354984si.ngl> //
                   "/usr/share/dict/words").Str, #= dictionary file
+    Int :$length = 7, #= minimum word length (default: 7)
     Bool :s($sample), #= run the sample puzzle
     Bool :v($verbose), #= increase verbosity
     Bool :$version, #= print version
@@ -23,8 +24,8 @@ multi sub MAIN (
     }
 
     # @dict holds the sorted dictionary. Only consider words >= 7
-    # chars.
-    my Str @dict = $dict.IO.lines.grep(*.chars >= 7);
+    # chars by default.
+    my Str @dict = $dict.IO.lines.grep(*.chars >= $length);
 
     # @puzzle holds the puzzle.
     #