teambit / bvm

Bit version manager
Other
42 stars 13 forks source link

feature: unlink command #14

Open KutnerUri opened 3 years ago

KutnerUri commented 3 years ago

it's possible to change the name of the bit command, for example:

bvm config set DEFAULT_LINK bbiitt
bvm link
# command bbiitt is now available

after which, there is not way to remove the old command. it should be as simple as

rm `which $OLD_COMMAND_NAME`

additionally, we should prompt the user with a hint to remove the old link, like

❯ bvm config set DEFAULT_LINK bbiitt
❯ bvm install
# ...
❯ bvm config set DEFAULT_LINK bit
❯ bvm link
name bit points to version 0.0.406
successfully linked binaries
use `bvm unlink bbiitt` to remove old command
# or
rm `which bbiitt` to remove old command
KutnerUri commented 3 years ago

also, after changing default link, I still get the old link in the bvm config, so it gets reinstalled every time

bit-bin git/master  
❯ bvm config
{
  BVM_DIR: '/Users/kutner/.bvm',
  DEFAULT_LINK: 'bit',
  'links.bbit': '0.0.406', # reinstalls bbit every time
  'links.bit': '0.0.406'
}