-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
brew linkapps
should *move* instead of linking
#22379
Conversation
This also adds a `--symlink` flag to preserve the old behaviour for those who preferred it; as well as a `--force` flag for manually upgrading anything Homebrew might have created.
One note: f10ede8 does not rename the command. I only wish to open the discussion here; if my changes are generally amenable, I'll need to add a commit that renames the command. I also wish to write/push documentation for |
No. |
I'd be against this. So what if it's surprising to the new user. What matters is not whether its surprising, but whether it's good or bad. And at least half of what is good about homebrew in general is the ability to unlink (and therefore quasi-disable) without removing. That would be destroyed for GUI apps if this PR is accepted. That said, the symlinkphobia of various parts of OSX can be a pain. So this sounds like one of those cases where it's best to just make your own external command (say, brew-moveapps.rb) and just call it instead of linkapps. FYI: By far the best way to associate apps with filetypes is the venerable RCDefaultApp, which still works flawlessly on 10.8. I mention this because it's not afraid of symlinks. For years I've had it pick up my symlink to MacVim. |
No moving, sorry. |
Just take your revised version of brew-linkapps.rb, make a copy, rename the copy to I have a dedicated dot folder in The devs can't adopt every good idea, or every harmless optional flag for something, for brew would get unwieldy. But they've given us the facility to adopt our own good (or bad) ideas, without needing to know git. |
What @chdiza said. |
Okay. Updated #22380 to reflect this decision. |
Although the
brew linkapps
operation is studiously in-line with the rest of the Homebrew commands, its current operation is very surprising to the newcomer, and doesn't integrate very well with the OS X GUI as a whole. If someone's using Homebrew, and thus an OS X machine, I believe they can be assumed to be using the rest of the system's features on a daily basis, including the GUI. (Else, why not use another *NIX?)Most importantly, one has to navigate deep into the Homebrew file-tree from within the GUI to set the default application to open a particular file with, or to select an application to link to a particular file-type. This is because as it currently stands, installing an application with Homebrew (which, admittedly, is a fairly rare occurrence … with some important exceptions) suggests afterwards that one use
brew linkapps
, which itself proceeds to symlink the applications into OS X-supplied directories. Unfortunately, none of OS X's features (Spotlight, open-with, default-apps, etceteras) seem to support symlinks, currently.I propose, for ease-of-use and lease-surprising-effect purposes, that
brew linkapps
be refactored to move the.app
folders into the relevantApplications/
folder, and then symlink them back into their build-tree.I attach a patch that does exactly this. I included flags to modify the functionality, as well as restore the old functionality. Tested flawlessly with MacVim.
(Relevant: #22378.)