doc: update homebrew.md 3d1317603e

This commit is contained in:
jaywcjlove
2023-02-20 03:09:46 +00:00
parent 120ff5131d
commit b3b9f7768c
5 changed files with 25 additions and 10 deletions

View File

@ -31,7 +31,7 @@
<p>Homebrew 是 macOS(或Linux)缺少的包管理器,备忘清单包含 <a href="https://github.com/Homebrew/brew">brew</a> 命令的使用与安装</p>
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#homebrew">Homebrew</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装">安装</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#命令">命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#更多包命令">更多包命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#brew-cask-命令">Brew Cask 命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#全局命令">全局命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#brew-清理">Brew 清理</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#brew-源码仓库">Brew 源码仓库</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#搜索查看">搜索查看</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#帮助命令">帮助命令</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="homebrew"><a aria-hidden="true" tabindex="-1" href="#homebrew"><span class="icon icon-link"></span></a>Homebrew</h2><div class="wrap-body">
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#homebrew">Homebrew</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装">安装</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#命令">命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#更多包命令">更多包命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#brew-cask-命令">Brew Cask 命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#全局命令">全局命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#brew-清理">Brew 清理</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#brew-源码仓库">Brew 源码仓库</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#搜索查看">搜索查看</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#帮助命令">帮助命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#依赖">依赖</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#卸载-homebrew">卸载 Homebrew</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="homebrew"><a aria-hidden="true" tabindex="-1" href="#homebrew"><span class="icon icon-link"></span></a>Homebrew</h2><div class="wrap-body">
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist row-span-3"><div class="wrap-header h3wrap"><h3 id="安装"><a aria-hidden="true" tabindex="-1" href="#安装"><span class="icon icon-link"></span></a>安装</h3><div class="wrap-body">
<!--rehype:wrap-class=row-span-3-->
<pre class="wrap-text "><code class="language-bash code-highlight"><span class="code-line">/bin/bash <span class="token parameter variable">-c</span> <span class="token string">"<span class="token variable"><span class="token variable">$(</span><span class="token function">curl</span> <span class="token parameter variable">-fsSL</span> https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh<span class="token variable">)</span></span>"</span>
@ -253,6 +253,21 @@
<table><thead><tr><th align="left">命令</th><th align="left">说明</th></tr></thead><tbody><tr><td align="left"><code>brew help</code></td><td align="left">打印帮助信息</td></tr><tr><td align="left"><code>brew help &#x3C;sub-command></code></td><td align="left">打印子命令的帮助信息</td></tr></tbody></table>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="依赖"><a aria-hidden="true" tabindex="-1" href="#依赖"><span class="icon icon-link"></span></a>依赖</h3><div class="wrap-body">
<p>显示<code></code>的依赖关系。 特定于<code></code>的其他选项可能是附加到命令</p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line"><span class="token comment"># 您还可以看到包和依赖关系图</span>
</span><span class="code-line">$ brew deps <span class="token parameter variable">--tree</span> <span class="token parameter variable">--installed</span>
</span><span class="code-line">$ brew deps <span class="token function">git</span> <span class="token comment"># 显示 git 依赖</span>
</span></code></pre>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="卸载-homebrew"><a aria-hidden="true" tabindex="-1" href="#卸载-homebrew"><span class="icon icon-link"></span></a>卸载 Homebrew</h3><div class="wrap-body">
<ul>
<li>使用官方卸载脚本卸载 Homebrew</li>
<li>验证文件是否已删除</li>
</ul>
<pre class="wrap-text "><code class="language-bash code-highlight"><span class="code-line">$ /bin/bash <span class="token parameter variable">-c</span> <span class="token string">"<span class="token variable"><span class="token variable">$(</span><span class="token function">curl</span> <span class="token parameter variable">-fsSL</span> https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh<span class="token variable">)</span></span>"</span>
</span><span class="code-line">$ <span class="token function">sudo</span> <span class="token function">rm</span> <span class="token parameter variable">-rf</span> /opt/homebrew
</span></code></pre>
<!--rehype:className=wrap-text -->
</div></div></div></div></div><div class="wrap h2body-not-exist"><div class="wrap-header h2wrap"><h2 id="另见"><a aria-hidden="true" tabindex="-1" href="#另见"><span class="icon icon-link"></span></a>另见</h2><div class="wrap-body">
<ul>
<li><a href="https://brew.sh/index_zh-cn">Homebrew 官网</a> <em>(brew.sh)</em></li>

View File

@ -164,7 +164,7 @@
</span><span class="code-line"><span class="token operator">>></span><span class="token operator">></span> <span class="token string-interpolation"><span class="token string">f'</span><span class="token interpolation"><span class="token punctuation">{</span>num<span class="token punctuation">}</span></span><span class="token string"> + 10 = </span><span class="token interpolation"><span class="token punctuation">{</span>num <span class="token operator">+</span> <span class="token number">10</span><span class="token punctuation">}</span></span><span class="token string">'</span></span>
</span><span class="code-line"><span class="token string">'10 + 10 = 20'</span>
</span></code></pre>
<p>查看: <a href="#python-f-%E5%AD%97%E7%AC%A6%E4%B8%B2-%E8%87%AA-python-3-6-%E8%B5%B7">Python F-Strings</a></p>
<p>查看: <a href="#python-f-%E5%AD%97%E7%AC%A6%E4%B8%B2%E8%87%AA-python-36-%E8%B5%B7">Python F-Strings</a></p>
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="python-数据类型"><a aria-hidden="true" tabindex="-1" href="#python-数据类型"><span class="icon icon-link"></span></a>Python 数据类型</h2><div class="wrap-body">
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="字符串"><a aria-hidden="true" tabindex="-1" href="#字符串"><span class="icon icon-link"></span></a>字符串</h3><div class="wrap-body">
<pre class="language-python"><code class="language-python code-highlight"><span class="code-line">hello <span class="token operator">=</span> <span class="token string">"Hello World"</span>