前提 Mac上安装好Item2
Step1:在终端上安装Homebrew。具体命令:/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
Step2:安装lrzsz 具体命令:brew install lrzsz
Step3:在git上面copy脚本到终端的/usr/local/bin路径下。git地址:https://github.com/mmastrac/iterm2-zmodem,脚本如下图
![](https://img.haomeiwen.com/i3012096/e28827eeef452298.png)
Step4:在ITerm2中对应的profile中,具体操作:打开item2,打开profile
![](https://img.haomeiwen.com/i3012096/e3f0325c0df99aff.png)
![](https://img.haomeiwen.com/i3012096/193a9e4c158c77f5.png)
Step5:点击Edit,填入如下内容,重启item2,即可。
Regular expression: \*\*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
Instant勾选,不用重启就生效,不勾选得重启才生效
![](https://img.haomeiwen.com/i3012096/01c8496f5befb78c.png)
网友评论