Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a builtin:version variable #1328

Closed
krader1961 opened this issue Jun 5, 2021 · 1 comment
Closed

Add a builtin:version variable #1328

krader1961 opened this issue Jun 5, 2021 · 1 comment

Comments

@krader1961
Copy link
Contributor

krader1961 commented Jun 5, 2021

The recent discussion in issue #1324 reminded me that I have long thought there should be something like a builtin:version variable that contains the same string emitted by elvish -version. I always worry that the value reported by elvish -version does not match the user's interactive shell. Even if that is unlikely in practice I would be happier asking the user to run echo $version. Also, it would be nice if this information was available in a form useful to an Elvish program so it can test which version is being used; i.e., a pseudo-map that exposes the major, minor, patch levels, etcetera. What I would love is the ability to use the var in a string context that automatically constructs the string from the constituent values of the map while allowing those values to be extracted individually; e.g., $version[major].

@krader1961
Copy link
Contributor Author

This is now implemented. I forgot to include a "Fixes #1328" line in my commit comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant