Add a usability option to quickly display version information on the command line without having to open the REPL#387
Add a usability option to quickly display version information on the command line without having to open the REPL#387Yewzir wants to merge 1 commit intoFascinatedBox:mainfrom
Conversation
|
This repository is more or less just a mirror now; you might want to reopen this on GitLab, where active development is happening nowadays. Otherwise, @FascinatedBox may not see it. |
|
Hi there! Apologies for not noticing this earlier: I use GitLab primarily now, and I accidentally didn't have GitHub emailing notifications. I've fixed that, so I should see these now. I'm cool with pulling this from here and mirroring to GitLab. I'm going to say no to this for a couple reasons: One: I'd like the output to be "Lily 2.3", not simply "2.3", which it would have as-is. Doing so would be consistent with Lua, Python, Ruby, and Perl. All of them report their names. At the moment, I'm not interested in adding a copyright to the version. Two: I'd like the commit message to be simplified: "Add -v to show version". Once those are done, then I'll pull this and mirror it over. |
No problem. Hereby rebased, fulfilling both requests. |
|
I don't remember the fputs being conditional in the first branch? Maybe I missed it? If I run this, it reports "Lily 2.3" but then mentions an error with the filename. You can puts instead of fputs if you're sending to stdout. My bad for not noticing all that earlier. |
In virtual environments like Docker, where fully automated deployment processes can be in full swing, this is often not even possible. Therefore, it's always nice to have such a usage option available, especially if the caller returns directly to the command line, so that deployments can continue or, depending on the information obtained (and especially how), can be gracefully terminated. Personally, I have so many development containers and build images that it would be ideal if they automatically included version tags, or something similar, in their final names. Therefore, I've made a small, but solid, and well-tested attempt to hopefully implement this in your project.