ayn2op / discordo

A lightweight, secure, and feature-rich Discord terminal client.
MIT License
2.07k stars 66 forks source link

Follow GNU & POSIX command-line syntax for flags #284

Closed u20n closed 1 year ago

u20n commented 1 year ago

POSIX dictates that commands flags follow the pattern -a and --a..., where -- indicates a more verbose -[0]. Currently, discordo uses -token, which should be changed to -t and --token.

[0]: https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html

Edit

POSIX only guarantees the short options, while GNU provides the long options.

ayn2op commented 1 year ago

Discordo uses the flag package from the Go standard libraries, hence deriving the syntax defined by it, not POSIX. While it would be awesome if it supported POSIX syntax for parsing command-line flags, I personally don't mind the current syntax. The valid forms can be found here: https://pkg.go.dev/flag#hdr-Command_line_flag_syntax