1,安装brew软件(有就不需要安装)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" #按提示安装
2,安装lrzsz
brew install lrzsz
3,下载iterm2-zmodem脚本
https://github.com/mmastrac/iterm2-zmodem
得到两个脚本iterm2-recv-zmodem.sh iterm2-send-zmodem.sh
把这两个脚本放到/usr/local/bin/下面(要有执行权限)
4,配置zmodem触发器
打开iterm2 ------ 同时按 command和,键 ------- Profiles ---------- Default ------- Advanced ------ Triggers的Edit按钮
Regular expression: rz waiting to receive.\*\*B0100 Action: Run Silent Coprocess Parameters: /usr/local/bin/iterm2-send-zmodem.sh Regular expression: \*\*B00000000000000 Action: Run Silent Coprocess Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
配置完成可以使用了