-
Notifications
You must be signed in to change notification settings - Fork 217
Feature request: allow omitting --name flag when reading from std.in #1016
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Related to #1015, perhaps the {--impl,--intf,--use-file} flags should avoid the need to pass a filename when reading from standard input:
ᐅ echo "let x = ()" | ocamlformat --profile=conventional --impl -
ocamlformat: Must specify name when reading from stdin
Describe the solution you'd like
Make --impl, --intf, --use-file override the need to pass a --name option. Relatedly, I think the error message when no flags are passed should suggest using one of the former rather than suggesting passing a name e.g.:
ᐅ echo "let x = ()" | ocamlformat --profile=conventional -
ocamlformat: Must use one of {--impl, --intf, --use-file} to specify the file-type
when reading from stdin.(as a user, I was initially confused as to why OCamlformat needed me to pass a --name in this case)
CC. @Julow
Reactions are currently unavailable