hroptatyr / yuck

Your Umbrella Command Kit, a bog-standard command line option parser for C with all the knickknackery and whatnots.
Other
61 stars 7 forks source link

is this the only c option parser that supports subcommands? #21

Closed okcy1016 closed 4 years ago

okcy1016 commented 4 years ago

first of all, thanks for the Umbrella team for bring us such a useful library. but, i'm so curious why there are no other tool or lib (i checked autoapts, gengetopt and getopt func) in c that can handle subcommand except this library. (at least this is what i found today)

Am i right? i'm grateful to hear from you guys. i'd like to see if there're other tool/libs that supports subcommand, thanks!

hroptatyr commented 4 years ago

Hey George, thanks for the thanks. I don't know of any other tools/libs that support subcommands. To be fair, subcommands are non-standard. The only major tool that uses them is git.

okcy1016 commented 4 years ago

thanks for the reply :D i have another question, why should we directly #include a .yucc file (c source code) in our main program, instead of include a cmdline.h header file like gengetopt? And will it cause any potential problems? (i heard some comments from stackoverflow )

hroptatyr commented 4 years ago

Yes it will cause problems if you happen to use any symbols in your code that are defined in the .yucc file too.

Also, you can generate a header (yuck gen -H output.h ...) to include in your code but then you must compile and link the .yucc file.

okcy1016 commented 4 years ago

that's awesome :smiley: