kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.41k stars 980 forks source link

Clarification difference between `show_key` and `show-key` #7402

Closed nobe4 closed 6 months ago

nobe4 commented 6 months ago

Hi 👋

It seems that the doc references two ways to show the keys:

Both seems to work, and to offer the same functionalities, however the name differences makes it confusing which one should really be used.

It seems that both are valid kittens:

$ kitten show-keys
Error: Unknown subcommand: show-keys. Did you mean:
    show-key
    show_key

https://github.com/kovidgoyal/kitty/blob/e7c4069b918d13e48b9c2769fbfbe7e2865eff3e/tools/cli/option.go#L103-L105 seems to be giving the option to use both.

Seems that it's the same for all kittens:

$ kitten hyperlinked-greps
Error: Unknown subcommand: hyperlinked-greps. Did you mean:
    hyperlinked-grep
    hyperlinked_grep

Probably the docs should explicit that both work?

Maybe a line in https://github.com/kovidgoyal/kitty/blob/e7c4069b918d13e48b9c2769fbfbe7e2865eff3e/tools/cmd/main.go#L24 would be enough to clarify this?

I don't know the reason to have this conversion on command names, but it confused me to see both in the docs.

Happy to PR an improvement if you think one make sense :)

kovidgoyal commented 6 months ago

Both work so users dont need to remember which one it is. The docs should all use the hyphen rather than the underscore. Feel free to send a PR fixing the docs.

nobe4 commented 6 months ago

Thanks! Done in https://github.com/kovidgoyal/kitty/pull/7404