Currently, the --export variants lack short flags, forcing commands to be verbose. This issue is intended to spark discussion rather than to provide a fixed change.
Inspired by the approach used in pandoc, we could introduce a short flag, -e or -f, as in -f <FORMAT> to reduce repetition. The specific letter isn't crucial, consistency is. Here's an example:
| Current |
Addition |
--export-asciidoc
--export-csv
--export-json
--export-markdown
--export-orgmode |
-f asciidoc
-f csv
-f json
-f markdown
-f orgmode |
This would align with existing flags, such as --sort auto and --output null.
There are multiple ways to implement this addition. For example, we could pass a second argument -f asciidoc <FILE>, or use it in combination with a new option -f asciidoc -o <FILE>.
This also opens the possibility for hyperfine to default to a specific format based on the file extension. Namely, -o file.md would be equivalent to --export-asciidoc <FILE>, simplifying the command further. That default could be overriden by specifying the format explicitly: -f asciidoc -o file.md.
That strategy could also be used with --parameter flags, and it may break compatibility:
| Current |
Addition |
--parameter-scan
--parameter-step-size
--parameter-list |
-P scan
-P step-size
-P list |
Ultimately the maintainers know what's best for the project, make any adjustments you see fit 🚀
Currently, the
--exportvariants lack short flags, forcing commands to be verbose. This issue is intended to spark discussion rather than to provide a fixed change.Inspired by the approach used in
pandoc, we could introduce a short flag,-eor-f, as in-f <FORMAT>to reduce repetition. The specific letter isn't crucial, consistency is. Here's an example:--export-asciidoc--export-csv--export-json--export-markdown--export-orgmode-f asciidoc-f csv-f json-f markdown-f orgmodeThis would align with existing flags, such as
--sort autoand--output null.There are multiple ways to implement this addition. For example, we could pass a second argument
-f asciidoc <FILE>, or use it in combination with a new option-f asciidoc -o <FILE>.This also opens the possibility for
hyperfineto default to a specific format based on the file extension. Namely,-o file.mdwould be equivalent to--export-asciidoc <FILE>, simplifying the command further. That default could be overriden by specifying the format explicitly:-f asciidoc -o file.md.That strategy could also be used with
--parameterflags, and it may break compatibility:--parameter-scan--parameter-step-size--parameter-list-P scan-P step-size-P listUltimately the maintainers know what's best for the project, make any adjustments you see fit 🚀