-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature request: Support latest:<regex>
syntax
#14
Comments
Thanks for the suggestion! In the spirit of the The biggest challenge of implementing "native" support for Support for selecting only local versions is simpler, but I'm not sure if that would be enough? All that said, I use myself a Fish config to use the latest installed version by default if the specified version is if test -f $HOME/.terraform-version
and type -q chtf
set -l v (cat $HOME/.terraform-version)
if test $v = "latest"
set v (chtf | tr -d ' *' | sort -V | tail -1)
end
chtf $v
end It should be fairly easy to implement similar Bash/ZSH version should, or to add more logic for filtering the matching version. What do you think? How would you like the whole thing to work? 🙂 As always, I seem to be a tight on free hacking time, but I'm happy to help and improve the functionality and docs up to certain point. And of course I'm open for PRs for those remote version helpers, maybe as separate command(s). |
I hadn't looked closely enough to realize that the entire logic for parsing the I think even just looking at locally installed versions would be helpful. Maybe I'll find the time to hack away at something myself. If I do I'll open a PR against the Readme. |
tfenv supports strings like
latest:^1.
in order to grab the most recent version that matches a regex constraint. This is useful for keeping within a particular major or minor version, while continuing to get patch and security updates without needing to manually change your.terraform-version
every time.I'd love to see chtf support this syntax as well, if only to maintain compatibility with existing
.terraform-version
filesThe text was updated successfully, but these errors were encountered: