Overhaul CLI #114
Labels
C-tests
Related to unit testing capabilities
C-tooling
Tools such as IDE integrations, formatters, linters, etc.
enhancement
New feature or request
Milestone
Is your feature request related to a problem? Please describe.
The CLI interface is cumbersome to work with:
--test <ENGINE>
is weird. It is unexpected that it takes an argument, and the engine (which would be more intuitive as an--engine
argument) might be needed for other commands as wellDescribe the solution you'd like
I realized that we can add subcommands backwards-compatibly (as long as their names are no valid Pomsky expressions, so
pomsky test
is fine).We add a
test
subcommand and deprecate the--test
flag. The engine is specified with the--engine
/-e
argument instead.The
--path
argument accepts a directory when in thetest
subcommand. Ideally, all Pomsky files can be compiled and tested with a simple invocation:Note that the flavor or the engine needs to be specified. It's not great to have
PCRE
as the default flavor for testing.Other possible subcommands are:
pomsky check
- analogous topomsky test
, but it only compiles, without running testspomsky eval
- compile and test a regular expression in a REPL.pomsky eval --regex
can be used as regex-test replacement.The text was updated successfully, but these errors were encountered: