mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 06:20:23 +08:00

It was always a bit ridiculous that argparse required `X-longflag` if that "X" short flag was never actually used anywhere. Since the short letter is for getopt's benefit, we can hack around this with our old friend: Unicode Private Use Areas. We have a counter, starting at 0xE000 and going to 0xF8FF, that counts up for all options that don't have a short flag and provides one. This gives us up to 6400 long-only options. 6.4K should be enough for everybody.