marcosnils / bin

Effortless binary manager
MIT License
640 stars 44 forks source link

Ability to set aliases of a downloaded binary file #183

Closed MurzNN closed 5 months ago

MurzNN commented 5 months ago

Many projects use a custom name of the release binary file, but the actual command name can be different.

For example, this project https://github.com/mglaman/drupalorg-cli have the release file name drupalorg.phar but the actual tool name is drupalorg, and a common name is dcli.

So, after installing this binary using bin, I have to manually rename it, that's no good.

To resolve this issue, will be good to provide the --alias option by which we can set a custom name of the target binary, something like this:

bin install https://github.com/mglaman/drupalorg-cli --alias dcli

Or maybe even better to keep the original name of the downloaded binary file, but make a symlinks with the alias names to it - this approach can cover even several aliases at once!

What do you think about this idea?

marcosnils commented 5 months ago

:wave: bin already supports this. You can install the binary as follows:

bin install https://github.com/mglaman/drupalorg-cli ~/bin/dcli

that will install the binary in the specified location. Seems like I forgot to put that optional argument in the install help.

MurzNN commented 5 months ago

Wow, great, it works! Thanx!