Gabriella439 / Gabriella439/optparse-generic
Handling lists the typical way shells might do (e.g. with globs for files)
- Dominant language
- Haskell
- Stars
- 215
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
When working with files, I'd like to be able to do something like `mycli -i ./**/*.hs` and have all the files populate `[FilePath]`. MVE:
```haskell
data MyCLI = MyCLI { files :: [FilePath], output :: FilePath }
deriving (Generic)
deriving anyclass (ParseRecord)
main :: IO ()
main = getRecord "file-based CLI" >>= print
```
Running this as `cabal run mycli -- --files ./**/*.hs --output ./output.txt` fails to parse with "InvalidArgument".
I can see that, from the docs, you expect lists to be handled as `--files x.hs --files y.hs` etc., but with file globbing that's not going to happen.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.