安装lrzsz
brew install lrzsz
下载sh文件
git clone https://github.com/luxihk/iterm2-zmodem.git
iterm2-send-zmodem.sh 和 iterm2-recv-zmodem.sh 移动到 /usr/local/bin/
配置iTerm 2 的Trigger
Regular expression: rz waiting to receive.\*\*B0100
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-send-zmodem.sh
Instant: checked
Regular expression: \*\*B00000000000000
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
Instant: checked
说明:sz/rz仅用于非攻城狮,建议scp互传。