purescript/purescript-docs-search

Improve parser for CLI arguments

klntsky opened this issue · 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"