暂时就这些常用的
alias ls="ls -hG"
alias curl="curl -x http://127.0.0.1:8888"
# kotlin
export KOTLIN_HOME=$HOME/Library/Kotlin
export PATH=$PATH:$KOTLIN_HOME/kotlinc/bin
function kotlinUpgrade() {
if [ ! -d "$myPath"]; then
rm -rf ~/Library/Kotlin
fi
cp -r /Applications/Android\
Studio.app/Contents/plugins/Kotlin ~/Library/
}
alias kotlinUpgrade="kotlinUpgrade"
function kotlinPermission() {
for k in kapt kotlin kotlin-dce-js kotlinc kotlinc-js kotlinc-jvm; do
chmod +x ~/Library/Kotlin/kotlinc/bin/$k
done
}
alias kotlinPermission="kotlinPermission"
function brewALiYun() {
unset HOMEBREW_BOTTLE_DOMAIN
git -C "$(brew --repo)" remote set-url origin
https://mirrors.aliyun.com/homebrew/brew.git # 以下针对 macOS 系统上的 Homebrew
BREW_TAPS="$(brew tap)"
for tap in core cask{-fonts,-versions}; do
if echo "$BREW_TAPS" | grep -qE "^homebrew/${tap}\$"; then
git -C "$(brew --repo homebrew/${tap})" remote set-url origin
https://mirrors.aliyun.com/homebrew/homebrew-${tap}.git
fi
done
# 重新设置 git 仓库 HEAD
brew update-reset
}
alias brewALiYun="brewALiYun"