Redisplay brew Post安装文本

时间:2017-02-17 23:44:06

标签: macos homebrew

通常,当我使用brew package manager在我的Macintosh计算机上安装工具和编程环境时,在安装结束时会有一些重要文本描述使用我刚刚安装的内容的一些细微差别。例如,在安装redis之后,您将看到类似以下内容的内容

$ brew install redis
# ... lots of stuff ...
==> Caveats
To restart redis after an upgrade:
  brew services restart redis
Or, if you don't want/need a background service you can just run:
  redis-server /usr/local/etc/redis.conf

没有运行brew uninstall [thing];然后重新运行brew install [thing];,有没有办法让brew重新显示此文本?

如果没有 - 鉴于此文本来自某个程序某处,有没有办法可以获得brew-package? (不确定这是正确的术语) - 并在一个结构良好的数据文件或程序中找到这个文本?

1 个答案:

答案 0 :(得分:2)

这些被称为“警告”,并打印有brew info。请参阅下面的youtube-dl示例:

$ brew install youtube-dl
...
==> Caveats
To use post-processing options, `brew install ffmpeg` or `brew install libav`.

Bash completion has been installed to:
  /home/baptiste/.linuxbrew/etc/bash_completion.d

zsh completion has been installed to:
  /home/baptiste/.linuxbrew/share/zsh/site-functions

fish completion has been installed to:
  /home/baptiste/.linuxbrew/share/fish/vendor_completions.d

==> Summary
  /.../Cellar/youtube-dl/2017.03.10: 11 files, 1.8M

然后:

$ brew info youtube-dl
...
==> Caveats
To use post-processing options, `brew install ffmpeg` or `brew install libav`.

Bash completion has been installed to:
  /home/baptiste/.linuxbrew/etc/bash_completion.d

zsh completion has been installed to:
  /home/baptiste/.linuxbrew/share/zsh/site-functions

fish completion has been installed to:
  /home/baptiste/.linuxbrew/share/fish/vendor_completions.d

您还可以使用brew info --json=v1检索特定于公式的警告(不是完成内容),例如:

$ brew info --json=v1 youtube-dl | jq .
[
  {
    "name": "youtube-dl",
    "full_name": "youtube-dl",
    "desc": "Download YouTube videos from the command-line",
    "homepage": "https://rg3.github.io/youtube-dl/",
    ...
    "caveats": "To use post-processing options, `brew install ffmpeg` or `brew install libav`.",
    ...
  }
]

注意我使用jq来美化输出。