countvajhula / countvajhula/cli

Is there a way to support --switch=parameter syntax ??

Open
#8 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Racket
Stars
15
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Given the following program --help generates help text that doesn't seem to support `--parameter=text` format, but `--parameter text`

```racket
#lang cli

(flag (file in-file-path)
("-f" "--file" "filepath")
(file in-file-path))

(program (hello)
(displayln (file))
)

(run hello)
```

CLI output:
```
PS ... > D:\Racket\Racket.exe .\tmp.rkt --help
usage: hello [ ... ]

is one of

-f , --file
filepath to write the changelog to. Can NOTE use --file=foo must use --file foo
--help, -h
Show this help
--
Do not treat any remaining argument as a switch (at this level)

* Asterisks indicate options allowed multiple times.

Multiple single-letter switches can be combined after
one `-`. For example, `-h-` is the same as `-h --`.

PS ...> D:\Racket\Racket.exe .\tmp.rkt --file hello
hello
PS ...> D:\Racket\Racket.exe .\tmp.rkt --file=hello
hello: unknown switch: --file=hello
PS C:\Users\aias\Documents\Development\simple_changelog>
```

(but thank you very much for making this little language!)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.