让 mac iterm2 支持 lrzsz

Posted on Posted in mac

感谢 github -> mmastrac

# 安装 lrzsz
brew install lrzsz
# mac 上默认的 lrzsz 不好用,会 hang 住
git clone https://github.com/mmastrac/iterm2-zmodem

cp iterm2-send-zmodem.sh iterm2-recv-zmodem.sh /usr/local/bin/
chmod 744 /usr/local/bin/iterm2* # 修改下权限

打开 iterm2,command+,打开 iterm2 的属性

Profiles -> Advanced -> Edit

打开后一共有四列,依次填入,如上图

1.    Regular expression: rz waiting to receive.\*\*B0100
2.    Action: Run Silent Coprocess
3.    Parameters: /usr/local/bin/iterm2-send-zmodem.sh
4.    Instant: checked

1.    Regular expression: \*\*B00000000000000
2.    Action: Run Silent Coprocess
3.    Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
4.    Instant: checked

完成后即可使用了

» 转载请注明来源:若我若鱼 » 让 mac iterm2 支持 lrzsz

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × two =