Clarify CLI options

This commit is contained in:
James Eversole 2025-01-01 19:32:41 -06:00
parent fff29199d1
commit 18ff2d2e04
2 changed files with 13 additions and 15 deletions

View File

@ -64,27 +64,25 @@ tricu [COMMAND] ... [OPTIONS]
tricu: Exploring Tree Calculus tricu: Exploring Tree Calculus
Common flags: Common flags:
-? --help Display help message -? --help Display help message
-V --version Print version information -V --version Print version information
tricu [repl] [OPTIONS] tricu [repl] [OPTIONS]
Start interactive REPL Start interactive REPL
tricu eval [OPTIONS] tricu eval [OPTIONS]
Evaluate a file and return the result of the expression in the final line Evaluate tricu and return the result of the final expression.
-f --file=FILE Optional input file path for evaluation. -f --file=FILE Input file path(s) for evaluation.
Defaults to stdin. Defaults to stdin.
-o --output=OUTPUT Optional output file path for resulting output. -t --form=FORM Optional output form: (fsl|tree|ast|ternary|ascii).
Defaults to stdout. Defaults to fsl "Fork Stem Leaf" form.
-t --form=FORM Optional output form: (fsl|tree|ast|ternary|ascii).
Defaults to fsl.
tricu decode [OPTIONS] tricu decode [OPTIONS]
Decode a Tree Calculus value into a string representation Decode a Tree Calculus value into a string representation.
-f --file=FILE Optional input file path to attempt decoding. -f --file=FILE Optional input file path to attempt decoding.
Defaults to stdin. Defaults to stdin.
``` ```
## Acknowledgements ## Acknowledgements

View File

@ -29,7 +29,7 @@ evaluateMode :: TricuArgs
evaluateMode = Evaluate evaluateMode = Evaluate
{ file = def &= help "Input file path(s) for evaluation.\n \ { file = def &= help "Input file path(s) for evaluation.\n \
\ Defaults to stdin." \ Defaults to stdin."
&= name "f" &= name "f" &= typ "FILE"
, form = FSL &= typ "FORM" , form = FSL &= typ "FORM"
&= help "Optional output form: (fsl|tree|ast|ternary|ascii).\n \ &= help "Optional output form: (fsl|tree|ast|ternary|ascii).\n \
\ Defaults to fsl \"Fork Stem Leaf\" form." \ Defaults to fsl \"Fork Stem Leaf\" form."
@ -42,9 +42,9 @@ evaluateMode = Evaluate
decodeMode :: TricuArgs decodeMode :: TricuArgs
decodeMode = Decode decodeMode = Decode
{ file = def { file = def
&= help "Optional input file path(s) to attempt decoding.\n \ &= help "Optional input file path to attempt decoding.\n \
\ Defaults to stdin." \ Defaults to stdin."
&= name "f" &= name "f" &= typ "FILE"
} }
&= help "Decode a Tree Calculus value into a string representation." &= help "Decode a Tree Calculus value into a string representation."
&= explicit &= explicit