commit f478a7d0910d2ca767fe307b994ea7079e64e0b7
parent 03cbadcc5462829f3190d3483d23eb77f67619c5
Author: James Eversole <james@eversole.co>
Date: Wed, 1 Jan 2025 19:32:41 -0600
Clarify CLI options
Diffstat:
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
@@ -64,27 +64,25 @@ tricu [COMMAND] ... [OPTIONS]
tricu: Exploring Tree Calculus
Common flags:
- -? --help Display help message
- -V --version Print version information
+ -? --help Display help message
+ -V --version Print version information
tricu [repl] [OPTIONS]
Start interactive REPL
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.
- Defaults to stdin.
- -o --output=OUTPUT Optional output file path for resulting output.
- Defaults to stdout.
- -t --form=FORM Optional output form: (fsl|tree|ast|ternary|ascii).
- Defaults to fsl.
+ -f --file=FILE Input file path(s) for evaluation.
+ Defaults to stdin.
+ -t --form=FORM Optional output form: (fsl|tree|ast|ternary|ascii).
+ Defaults to fsl "Fork Stem Leaf" form.
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.
- Defaults to stdin.
+ -f --file=FILE Optional input file path to attempt decoding.
+ Defaults to stdin.
```
## Acknowledgements
diff --git a/src/Main.hs b/src/Main.hs
@@ -29,7 +29,7 @@ evaluateMode :: TricuArgs
evaluateMode = Evaluate
{ file = def &= help "Input file path(s) for evaluation.\n \
\ Defaults to stdin."
- &= name "f"
+ &= name "f" &= typ "FILE"
, form = FSL &= typ "FORM"
&= help "Optional output form: (fsl|tree|ast|ternary|ascii).\n \
\ Defaults to fsl \"Fork Stem Leaf\" form."
@@ -42,9 +42,9 @@ evaluateMode = Evaluate
decodeMode :: TricuArgs
decodeMode = Decode
{ file = def
- &= help "Optional input file path(s) to attempt decoding.\n \
+ &= help "Optional input file path to attempt decoding.\n \
\ Defaults to stdin."
- &= name "f"
+ &= name "f" &= typ "FILE"
}
&= help "Decode a Tree Calculus value into a string representation."
&= explicit