1. 程式人生 > 其它 >Mac上items2的配置

Mac上items2的配置

本篇的配置主要集中在如何用item2方便的下載檔案,其本質是用scp命令,達到的效果是用滑鼠右鍵檔案,從選單中可以直接選擇下載,比較方便。

我的Mac是zsh的shell。$ echo $SHELL 返回:/bin/zsh   1.  首先要新增Shell Integration的功能: https://iterm2.com/documentation-shell-integration.html   2.  需要在我要ssh連線的機器上也執行這個: curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash source ~/.iterm2_shell_integration.bash   3. 然後就可以在ssh連線上後,滑鼠右鍵點選檔案,在彈出來的選單上選擇:download with scp from hostname   4. 但是如果改了hostname和ssh埠的話,操作就會失敗。這時候需要做出修改。 參考文件是:
https://gitlab.com/gnachman/iterm2/-/wikis/scp-not-connecting#how-can-i-override-the-hostname
修改遠端機器上的配置,我用的是bash,所以改的是這個檔案:~/.profile 添加了: export iterm2_hostname=your_ip:ssh_port