tpope / rbenv-aliases

Create aliases for rbenv Ruby versions
MIT License
129 stars 18 forks source link

not autoalias after uninstall a ruby version #8

Closed bachue closed 8 years ago

bachue commented 10 years ago

Why not re-alias automatically after uninstall a ruby version?

tpope commented 10 years ago

Sounds good. First step would be to change --auto to remove an existing symlink if no versions can be found.

jasonkarns commented 8 years ago

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.

jasonkarns commented 8 years ago

for reference, I've implemented this feature in nodenv-aliases here

Hoping to do a PR here soon