Open c-cube opened 4 years ago
It would a good plus to have. The only thing that make me think about it twice, is if the user do a simple copy-paste without checking, it can result on the install of an unwanted package, that can do to a lot of change on the switch... but maybe I'm overthinking...
@rjbou - I think @c-cube means:
$ opam info opclib-endian
[ERROR] No package matching opclib-endian found
Hint: Did you mean ocplib-endian?
rather than it actually doing the install (and it doesn't propose the command for the user to copy blindly)
it's a good question whether this is desirable in opam install
indeed. At the very least I think it'd have to ask for confirmation before fixing the typo, in a way that -y
doesn't override.
I think it'd be OK with the hint. I don't think any commands should be interactive about this (i.e. the user should have to issue a new, corrected command), or were you hoping that opam show opclib-endian
might do something like:
$ opam info opclib-endian
[WARNING] No package matching opclib-endian found
Hint: Did you mean ocplib-endian?
<><> ocplib-endian: information on all versions <><><><><><><><><><><><><><><><>
name ocplib-endian
...
?
Honestly I think even an error message mentioning the "did you mean" is fine, it helps avoiding scratching one's head because of a hard to spot typo.
Honestly I think even an error message mentioning the "did you mean" is fine, it helps avoiding scratching one's head because of a hard to spot typo.
i agree, that would be nice to have
instead of:
it'd be neat to suggest
ocplib-endian
, like ocamlc does :slightly_smiling_face: