Ability to link/unlink a single file from a formula #19024
Description
Verification
- This issue's title and/or description do not reference a single formula e.g.
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
Provide a detailed description of the proposed feature
The ability to unlink a single file/command instead of a whole formula and have this be preserved and respected across formula updates, so it doesn't get linked again. The command could be something like: "brew unlink --file (formula name)/path/to/file". (Open to suggestions!) The same can apply to brew link as well to link an unlinked single file back. (Unlinked files could be listed with "brew unlink --file --list", maybe?)
What is the motivation for the feature?
I have a command line utility symlinked from an application that clashes with a legacy imagemagick command (convert, more specifically). I don't really want to reorder my PATH and put this directory above brew, nor do I want to unlink the whole imagemagick formula to get this command running. This gave me the idea for granular file link/unlink and I would really appreciate it if this feature was available.
How will the feature be relevant to at least 90% of Homebrew users?
I'm sure granular control over modifying paths beyond simply link/unlink whole formulas created by Homebrew will be useful to a great portion of its users, as putting a path entry way above Homebrew may not be viable in some cases.
What alternatives to the feature have been considered?
I've resorted to deleting the offending brew symlink by hand for now, however I don't know if it will be replaced when the formula gets updated (it probably will). Besides that, I don't know of any real alternatives for this behaviour.