oh-my-fish / plugin-brew

Oh My Fish plugin to integrate Homebrew paths into shell.
MIT License
16 stars 10 forks source link

Note: You need to have brew installed. #10

Closed kendofriendo closed 2 years ago

kendofriendo commented 4 years ago

But how?

bobthecow commented 4 years ago

Follow the instructions on https://brew.sh

vitor-mariano commented 3 years ago

I already installed brew and it's working properly on bash, but I'm still receiving this error.

metawave commented 3 years ago

@Kenney-G @vitor-mariano do you use linux by any chance? If yes: this plugin does only work on macOS as far as I can see.... there is another especially for brew on linux: https://github.com/oh-my-fish/plugin-linuxbrew, but this will only work if you did the brew installation https://docs.brew.sh/Homebrew-on-Linux only with the alternative method (.linuxbrew in your homefolder). For global installations (default method) it won't work either.... this plugin seems to be out-dated also https://github.com/oh-my-fish/plugin-brew/issues/8 has some more points why this should be updated.... even for macOS

for now I don't use the plugin and do something like:

# brew (check for default linux and macOS locations)
set -l possible_brew_paths /usr/local/bin /home/linuxbrew/.linuxbrew/bin

for possible_brew_path in $possible_brew_paths
    if test -f $possible_brew_path/brew
        eval ($possible_brew_path/brew shellenv)
    end
end

in my init.fish since I work on linux as well as macOS...

I'm quite new to the fish world, maybe I'll find some time creating a pull request of some sort for this one....

kendofriendo commented 3 years ago

I use Linux (Open-SUSE Tumbleweed) and WSL (Open-SUSE Leap).

The easiest solution I've found is to keep bash as your default shell, do the homebrew installation through bash, and add a command to change to fish as soon as you log in to your ~/.bashrc or~/ .profile. I just put fish at the end of my ~/.profile and it works fine.

I don't really use homebrew anymore though. I just wanted it for a quick Ruby setup but SUSE comes with Ruby anyways.