purescript-docs-search icon indicating copy to clipboard operation
purescript-docs-search copied to clipboard

Improve parser for CLI arguments

Open klntsky opened this issue 5 years ago • 0 comments

As for now, we do something like fromMaybe defaultCommands <$> getArgs where getArgs :: Effect (Maybe Commands). The default command is Search (i.e. start an interactive CLI session) with some reasonable defaults.

Thus, we are unable to pass arguments to the default command when it's not specified explicitly. E.g. this fails:

purescript-docs-search \
  --bower-jsons ".spago/*/*/bower.json" \
  --bower-jsons "bower_components/purescript-*/bower.json"

klntsky avatar Aug 11 '20 18:08 klntsky