1、下载term2
下载地址:https://www.iterm2.com/index.html
2、下载安装lrzsz
brew install lrzsz
ln -s /usr/local/Cellar/lrzsz/0.12.20_1/bin/sz
ln -s /usr/local/Cellar/lrzsz/0.12.20_1/bin/rz
3、下载并安装automatic zmoderm for iTerm2
cd usr/local/bin
wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-send-zmodem.sh
wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-recv-zmodem.sh
chmod 777 /usr/local/bin/iterm2-*
automatic zmoderm文件地址:
https://github.com/mmastrac/iterm2-zmodem
4、添加iTerm2 trigger
iTerm2 --> Profiles --> Open Profiles --> Edit Profiles --> Advanced --> Edit Trigger
配置项:
Regular expression Action Parameters
\*\*B0100 Run Silent Coprocess /usr/local/bin/iterm2-send-zmodem.sh
\*\*B00000000000000 Run Silent Coprocess /usr/local/bin/iterm2-recv-zmodem.sh