ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
799 stars 127 forks source link

[chump] add `--query:[version_language|version_chugin_api]` command-line args #440

Closed nshaheed closed 3 months ago

nshaheed commented 3 months ago

These are to support querying info about the installed version of chuck from chump.

Examples:

> nshaheed@nick-laptop:~/programming/chuck/src$ ./chuck --query:version_language
1.5.2.5-dev (chai)nshaheed@nick-laptop:~/programming/chuck/src$

> nshaheed@nick-laptop:~/programming/chuck/src$ ./chuck --query:version_chugin_api
10.1nshaheed@nick-laptop:~/programming/chuck/src$

(there's no newline being outputted)

One question I have is: --help and --version set the variables doAbout and doVersion and then actually print things after some instantiation has been done. Is this necessary for --query? How I'm imagining this is that chuck will just spit out the string and then exit so I don't necessarily see a reason to do all the instantiation, but I'm probably missing some context here.