Closed bachue closed 8 years ago
Sounds good. First step would be to change --auto to remove an existing symlink if no versions can be found.
This logic is already there: https://github.com/tpope/rbenv-aliases/blob/155dc4404a2eac0a134d6357ad2d0b7ea302e302/bin/rbenv-alias#L33-L41
Sorta. rbenv alias --auto
without specifying a version already cleans up any dangling aliases. However,
$ rbenv alias <missing_version> --auto
Couldn't find any versions for <missing_version>
Unfortunately, we can't just call rbenv alias --auto
on uninstall because that could add/alter aliases to other versions that shouldn't be affected by the uninstalled version.
for reference, I've implemented this feature in nodenv-aliases here
Hoping to do a PR here soon
Why not re-alias automatically after uninstall a ruby version?