adamritter / fastgron

High-performance JSON to GRON (greppable, flattened JSON) converter
MIT License
592 stars 10 forks source link

Does `-` work as a synonym for standard input? #21

Closed kseistrup closed 9 months ago

kseistrup commented 9 months ago

This is fastgron version 0.7.5 commit fd3a34a96c8857d0e3e14db2f09a15eae0adaa9a

I'm not sure I understand in which situations I can use - as a synonym for standard input:

$ fastgron -h 2>&1 | head -n4
Usage: fastgron [OPTIONS] [FILE | URL] [.path]

positional arguments:
  FILE           file name (or '-' for standard input)
$ jo a=1                  # let's generate some  JSON
{"a":1}
$ jo a=1 | fastgron       # this works well
json = {}
json.a = 1
$ jo a=1 | fastgron -     # being explicit about stdin does not work so well
Unknown option: -
$ jo a=1 | fastgron -- -  # attempting to terminate options with “--” also doesn't work
Unknown option: --
adamritter commented 9 months ago

Fixed in 0.7.7