如何在iTerm2上安装imgcat?


28

我该如何处理脚本?请以简单的英语逐步说明。

背景

我看到您可以在iTerm2中内嵌显示图像

在此处输入图片说明

但是,当我单击此处的“下载imgcat ”链接时,它只是带我到具有脚本的URL。但是我该怎么办呢?复制某处?之后运行吗?

Answers:


38

只需安装“ Shell Integration”,它将自动为您安装。

在iTerm2菜单上,只需单击“安装Shell集成”

在此处输入图片说明

然后,您应该看到指示已安装imgcat的输出:

$curl -L https://iterm2.com/misc/install_shell_integration_and_utilities.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2694  100  2694    0     0   2890      0 --:--:-- --:--:-- --:--:--  2890
Downloading script from https://iterm2.com/misc/bash_startup.in and saving it to /Users/allan/.iterm2_shell_integration.bash...
Checking if /Users/allan/.bash_profile contains iterm2_shell_integration...
Downloading imgcat...
Downloading it2dl...
Adding aliases...
Done.
--------------------------------------------------------------------------------

The next time you log in, shell integration will be enabled.

You will also have these commands:
imgcat filename
  Displays the image inline.
it2dl filename
  Downloads the specified file, saving it in your Downloads folder.

4
完善。感谢您添加屏幕截图,以使其易于遵循。
JGallardo

Wierdly,默默的失败对我的高塞拉利昂
Kheldar
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.