.vvconfig/.config/fish/conf.d/brew.fish

19 lines
852 B
Fish

eval "$(/opt/homebrew/bin/brew shellenv)"
set -x HOMEBREW_BREW_GIT_REMOTE "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
set -x HOMEBREW_CORE_GIT_REMOTE "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
set -x HOMEBREW_API_DOMAIN "https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
set -x HOMEBREW_BOTTLE_DOMAIN "https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
#set -x HOMEBREW_INSTALL_FROM_API 1
set -x HOMEBREW_PIP_INDEX_URL "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
function b
command brew $argv
if contains -- "install" $argv; or contains -- "remove" $argv; or contains -- "uninstall" $argv;
echo "Updating Brewfile..."
command bash -c "brew bundle dump --force --file=~/.config/Brewfile"
end
end
function brew_install
brew bundle --file="~/.config/Brewfile"
end