Mac安装lrzsz
brew install lrzsz
配置iterm2
cd /usr/local/bin
sudo wget https://laifu.live/package/Mac/iterm2-lrzsz/iterm2-recv-zmodem.sh
sudo wget https://laifu.live/package/Mac/iterm2-lrzsz/iterm2-send-zmodem.sh
sudo chmod 777 /usr/local/bin/iterm2-*
点击 iTerm2 的设置界面 Perference -> Profiles -> Default -> Advanced -> Triggers 的 Edit 按钮
详细配置如下:
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
批量配置
具体操作步骤如下:
1、进入 iTerm2 的 Preferences
2、Profiles 随便选一个 Profile 修改,然后选中它
3、点击 Profile 左下角的 Other Actions
4、选中弹出的 Bulk copy from Selected Profile
5、在新窗口中的第二行复选框 勾选你要复制的配置,例如:Colors
6、在下方选中要批量修改的 Profiles,点击 copy 即可