ITerm中使用lrzsz

配置lrzsz

在此之前你必须要安装iTerm2,然后:

brew install lrzsz

下载iterm2-zmodem:

cd /usr/local/bin
sudo wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-send-zmodem.sh
sudo wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-recv-zmodem.sh
sudo chmod 777 /usr/local/bin/iterm2-*

打开Item2,点击preferences → profiles,选择某个profile,如Default,之后继续选择advanced → triggers,添加编辑添加如下triggers:

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

也可以去这里查看:https://github.com/mmastrac/iterm2-zmodem

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注