以 macOS + zsh + Sublime Text 3 为例
-
备份原有配置文件
➜ cp ~/.zshrc ~/.zshrc.bak
-
追加命令对应的 alias
➜ echo '\n#alias for Sublime\nalias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"' >> ~/.zshrc
-
使配置文件马上生效
➜ source ~/.zshrc
基本使用:
- 使用
subl
打开 Sublime- 使用
subl filename
在 Sublime 中打开对应的文件