iTerm 配置
约 162 字小于 1 分钟
2020-07-02
安装 Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
iTerm设置
ZSH_THEME="agnoster" # 主题
# 字体: Meslo LG M Regular for Powerline
iTerm插件
语法高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
安装zsh-autosuggestions插件
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
iTerm配置文件
export ZSH="$HOME/Environment/.oh-my-zsh"
ZSH_THEME="agnoster"
# ZSH_THEME="steeef"
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
# Homebrew
export PATH=/opt/homebrew/bin/:$PATH
# Java
export JAVA_HOME=$HOME/Environment/Java/azul-11.0.20.1/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
# Flutter
export PATH="$PATH:$HOME/Environment/Flutter/flutter_3.13.6/bin"
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# adb
export PATH="$PATH:$HOME/Environment/Android/sdk/platform-tools"
# scrcpy
export PATH=/opt/homebrew/Cellar/scrcpy/2.0_1/bin:$PATH
# alias python='/opt/homebrew/bin/python3'
# alias pip='/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3'
# 自定义配置
prompt_context() {
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%m 👍"
fi
}