# iTerm
# CMD + D to split screen (left right)
# CMD + D + Shift to split screen (up down)
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
当我关闭并重新打开 iTerm2 时,我删除了除 1 之外的所有内容。它添加了另一行 :(
完整的 .zshrc 文件
cat << EOF >> ~/.zshrc
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
export PATH="/usr/local/opt/node@8/bin:$PATH"
export NODE_ENV
export EDITOR='atom -w'i
# export EDITOR='/usr/local/bin/atom'
export TERM="xterm-256color"
export ZSH=/Users/leongaban/.oh-my-zsh
export GIT_EDITOR=vim
# trade.io
alias trade="projects/trade.io/"
# alias tradefe="projects/trade.io/tradeio-front"
alias tradefe="projects/trade.io/frontend"
alias chrome="open /Applications/Google\ Chrome.app --args --disable-web-security --user-data-dir --ignore-certificate-errors"
# heroku
alias herokuprod="git push heroku master"
# alias herokustag="git push heroku master"
# personal
alias leongaban="projects/leongaban/"
alias gaban="projects/Gaban/"
alias moon="projects/Futuratum/moon.holdings"
alias moonio="projects/Futuratum/moonholdings.io"
alias moonnode="projects/Futuratum/moon.node"
alias futr="projects/Futuratum/"
alias tuts="projects/tutorials/"
alias udemy="projects/tutorials/udemy/"
alias areact="projects/tutorials/wesbos/Advanced-React"
# Configs
alias zconfig="atom ~/.zshrc"
alias ohmyzsh="atom ~/.oh-my-zsh"
alias hconfig="atom ~/.hyper.js"
alias gconfig="atom ~/.gitconfig"
alias hosts="sudo atom /etc/hosts"
# Yarn scripts
alias yarnstart="yarn start-legacy"
# Yarn jest tests
alias ju="npm t -- --u"
alias jw="yarn run test-jest:watch"
alias jt="yarn jest test"
alias jc="yarn run test-jest:coverage"
alias myip="ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'"
alias reset='clear && printf "\e[3J"'
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="robbyrussell"
ZSH_THEME="kolo"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
# plugins=(git)
source $ZSH/oh-my-zsh.sh
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# iTerm
# CMD + D to split screen (left right)
# CMD + D + Shift to split screen (up down)
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
答案1
唉,我刚刚明白了...不知道为什么把它放在这里。
cat << EOF >> ~/.zshrc
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
但删除它之后一切正常。