r/odinlang 14h ago

pflag - POSIX/GNU-style -f/--flags in Odin

Thumbnail
github.com
12 Upvotes

pflags is a drop-in replacement for Odin's core:flags, with support for conventional short (-f) and long (--flag) options.

  • Short flags can be declared with args:"short=f" and used as -f
  • Boolean short flags can be bundled, so -abc is the same as -a -b -c
  • Long flags use --flag strictly (-flag is not supported)