This PR adds a rename subcommand to allow users to rename binaries. This is preferred over using an alias in your .zshrc or .bashrc because renaming a binary with rename will update the Stewfile.lock.json as well as the binary name itself. This means that commands like stew uninstall <renamedBinary> and stew upgrade <renamedBinary> will work, which is not true if you use an alias.
Users will also automatically be prompted to rename a binary if:
The asset itself is the binary. Often these have names like binary-v0.0.1-darwin-arm64, which is not the name that people want to type into the command line.
If the binary is not automatically detected inside an archived asset (which can happen if 0 or >1 executable files are found in an archive). After selecting the binary, they will be prompted to rename it.
Finally, this PR switch out any usage of the path library in favor of the filepath library which uses / or \ in an operating-system compatible way. path only uses /.
This PR adds a
rename
subcommand to allow users to rename binaries. This is preferred over using an alias in your.zshrc
or.bashrc
because renaming a binary withrename
will update theStewfile.lock.json
as well as the binary name itself. This means that commands likestew uninstall <renamedBinary>
andstew upgrade <renamedBinary>
will work, which is not true if you use an alias.Users will also automatically be prompted to rename a binary if:
Finally, this PR switch out any usage of the
path
library in favor of thefilepath
library which uses/
or\
in an operating-system compatible way.path
only uses/
.