fish-shell / fish-shell/fish-shell
Don't allow abbreviated long options in getopt
- Dominant language
- Rust
- Stars
- 34.2k
- Forks
- 2.4k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 13
Description
I just noticed that our getopt implementation, taken from glibc and modified for wchar, allows unambiguous long option abbreviations.
That means `string match --reg` works even tho the option is `--regex`.
I don't think I have ever seen anyone use this on purpose.
Personally, I consider this to be a terrible design decision because it means that adding new long flags can break previous calls (e.g if we added `--regex-dialect` it would break all uses of `string match --reg`), and would like to remove it.
This is likely to be controversial, and the change would have to be backwards-incompatible (although, like I said, I have never seen anyone use this on purpose).
Contributor guide
Assessment
This issue has not been assessed yet.