bonzai
bonzai copied to clipboard
Add implied getopt-style dashed aliases
People expect dashes these days (unfortunately). So to help alleviate the adjustment it could help to automatically create hidden completion aliases for every command and alias that also has one and two dashes in front.
h|help -> -h --h --help -help
We'd keep the --h
even though that would be very rare. As aliases
these will automatically be replaced when tab is touched providing
immediately feedback about what the correct command is.
When completion is not available, we can log the error as an unsupported option, but give a really good hint about what the correct command is.
Nothing about the dashed support would even be documented because we definitely do not want to encourage that, mostly because people will expect that other behavior of getopt command lines, notably the ability to change and use them in any order.