Fix brew completion for brew install#3309
Conversation
Since brew mirgate Formula into Taps diectory Change the way to find out all Homebrew-Core Formula Compatible with old version Homebrew
share/completions/brew.fish
Outdated
| set -l formuladir (brew --repository)/Library/Formula/ (brew --repository)/Library/Taps/homebrew/homebrew-core/Formula | ||
| # __fish_complete_suffix .rb | ||
| ls $formuladir/*.rb | sed 's/.rb$//' | sed "s|^$formuladir||" | ||
| find $formuladir -name "*.rb" -type f 2> /dev/null | sed 's/.rb$//' | sed 's|^/\([^/]*/\)*||' |
There was a problem hiding this comment.
Let's try to use the string builtin here instead of sed
|
Might it assume less and be more future-proof (and able to generalize to other Taps) if you get the Formula directory via: |
|
This is pretty broken in master right now, I'm merging the fix. |
|
Wait, this is wrong:
|
|
|
|
Something like this will get a working path for the main keg. > echo (brew --repository homebrew/homebrew-core)/Formula
/usr/local/Library/Taps/homebrew/homebrew-core/Formula |
|
Compared to what I was getting from the PR update: |
|
Oh, I see, probably that's fine and for compatibility with other installs, not necessarily a problem. |
|
|
|
I will try this soon. How is the speed of |
|
That's much better than I'm getting. Maybe something is wrong with my install. edit: it's because I had a query. Seems fine to me. |
|
I like it, and you can just use |
|
With fresh install Hackintosh (Yosemite) last week. |
|
Let me know when you're done and happy and I'll merge this to master. Thanks! |
|
For |
* Fix brew completion for `brew install` * Using `brew search` rather than `brew --repository` - Homebrew migrated the directory holding their Formulas into Taps, breaking fish's completions. - New method to find all Homebrew-core Formulas - Compatible with old versions of Homebrew and more future proof * Replace fixed path to search formula with `brew --repository` * Replace `sed` with builtin `string replace`

Description
Since brew mirgate Formula into Taps diectory
Change the way to find out all Homebrew-Core Formula
Compatible with old version Homebrew