<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>簡睿隨筆</title>
	<atom:link href="http://jdev.tw/blog/feed" rel="self" type="application/rss+xml" />
	<link>https://jdev.tw/blog</link>
	<description>學習過程的紀錄與備忘🪟拓展您的應用視野</description>
	<lastBuildDate>Sat, 02 May 2026 01:53:35 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://jdev.tw/blog/wp-content/uploads/2025/11/cropped-jerry-fish-200x200-1-32x32.jpg</url>
	<title>簡睿隨筆</title>
	<link>https://jdev.tw/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】</title>
		<link>https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002</link>
					<comments>https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Sat, 02 May 2026 04:00:29 +0000</pubDate>
				<category><![CDATA[AI-Agent(OpenCode)]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[opencode]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9207</guid>

					<description><![CDATA[本次介紹OpenCode的CLI (命令行介面) 選項與TUI (文字介面) 的斜線命令，二者都提供了OpenCode的諸多系統功能。 1 命令行選項 OpenCode命令行不加任何參數時，會啟動TU&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9207" class="pvc_stats all  " data-element-id="9207" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>本次介紹OpenCode的CLI (命令行介面) 選項與TUI (文字介面) 的斜線命令，二者都提供了OpenCode的諸多系統功能。</p>
<p><span id="more-9207"></span></p>
<h2>1 命令行選項</h2>
<p>OpenCode命令行不加任何參數時，會啟動TUI模式，但若提供參數選項則有不同的功能，以下介紹常用的命令選項：</p>
<table>
<thead>
<tr>
<th style="text-align: left;">功能</th>
<th style="text-align: left;">命令</th>
<th style="text-align: left;">說明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">選項說明</td>
<td style="text-align: left;"><code>opencode help</code></td>
<td style="text-align: left;">顯示能使用的命令行選項</td>
</tr>
<tr>
<td style="text-align: left;">版本升級</td>
<td style="text-align: left;"><code>opencode upgrade</code></td>
<td style="text-align: left;">檢查是否有新版本，若有則升級</td>
</tr>
<tr>
<td style="text-align: left;">偵錯</td>
<td style="text-align: left;"><code>opencode debug</code></td>
<td style="text-align: left;">顯示所有偵錯選項</td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>opencode debug config</code></td>
<td style="text-align: left;">檢查設定檔</td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>opencode debug paths</code></td>
<td style="text-align: left;">顯示設定路徑         <br />home data bin log cache config state tmp</td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>opencode debug skill</code></td>
<td style="text-align: left;">顯示所有的技能</td>
</tr>
<tr>
<td style="text-align: left;">供應商</td>
<td style="text-align: left;"><code>opencode providers list</code></td>
<td style="text-align: left;">顯示已授權的供應商</td>
</tr>
<tr>
<td style="text-align: left;">模型</td>
<td style="text-align: left;"><code>opencode models</code></td>
<td style="text-align: left;">顯示已授權供應商的大語言模型</td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>opencode models nvidia</code></td>
<td style="text-align: left;">顯示特定供應商的大模型</td>
</tr>
<tr>
<td style="text-align: left;">管理MCP</td>
<td style="text-align: left;"><code>opencode mcp list</code></td>
<td style="text-align: left;">顯示MCP server清單</td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>opencode mcp add</code></td>
<td style="text-align: left;">交互式新增MCP server</td>
</tr>
</tbody>
</table>
<h2>2 斜線命令</h2>
<h3>2.1 什麼是斜線命令（Slash Commands）？</h3>
<p>在 OpenCode 的輸入框中，輸入 <strong><code>/</code></strong> 就會彈出命令面板。這些以斜線開頭的指令，讓你不用記憶複雜快捷鍵，也能快速執行各種操作。它是呼叫 AI 代理與自動化功能的「傳送門」。</p>
<p>把斜線命令想成是「快速選單」——就像你在 Discord 或 Notion 裡輸入 <code>/</code> 會出現功能選單一樣，OpenCode 也提供了一套完整的命令系統。</p>
<h3>2.2 基礎命令：生存必備</h3>
<p>這些命令是你每天打開 OpenCode 都會用到的，<strong>優先記熟</strong>。</p>
<h4>2.2.1 會話管理（Session）</h4>
<table>
<thead>
<tr>
<th>命令</th>
<th>功能</th>
<th>使用場景</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/sessions</code></td>
<td>列出所有 Session</td>
<td>在不同專案間切換</td>
</tr>
<tr>
<td><code>/new</code></td>
<td>建立新 Session</td>
<td>想開始一個全新的對話主題</td>
</tr>
<tr>
<td><code>/clear</code></td>
<td>清空當前 Session</td>
<td>同 <code>/new</code>，重新開始</td>
</tr>
<tr>
<td><code>/timeline</code></td>
<td>查看 Session 時間線</td>
<td>回溯之前的對話脈絡</td>
</tr>
<tr>
<td><code>/export</code></td>
<td>匯出 Session</td>
<td>儲存重要對話內容</td>
</tr>
<tr>
<td><code>/compact</code></td>
<td>壓縮對話上下文</td>
<td>Token 用量過高時，自動摘要歷史對話</td>
</tr>
<tr>
<td><code>/exit</code> / <code>/quit</code> / <code>:q</code> / <code>/q</code></td>
<td>離開 OpenCode</td>
<td>結束程式</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!warning] 新手陷阱<br />
很多人會在一個 Session 裡聊好幾個完全不相關的主題，導致 AI 混淆，而且也增加了Tokens用量，平白浪費了費用。建議<strong>一個 Session 只處理一個主題</strong>，切換主題就用 <code>/new</code>。</p>
<p>[!tip]+ 不同工作區有不同Sessions<br />
Session 依工作區切分，不同工作區有不同的Session清單</p>
</blockquote>
<h4>2.2.2 模型切換（Models）</h4>
<table>
<thead>
<tr>
<th>命令</th>
<th>功能</th>
<th>使用場景</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/connect</code></td>
<td>更換模型供應商</td>
<td>切換到不同的供應商，例如從 OpenAI 換到 Claude</td>
</tr>
<tr>
<td><code>/models</code></td>
<td>開啟模型列表</td>
<td>切換不同 LLM，例如從 GPT-5 換到 Opus-4.7</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!tip] 省錢小技巧: OpenCode Zen適用<br />
輸入 <code>/models</code> 後，選擇標示 <strong>Free</strong>  的模型（如 Nemotran 3 Super Free、MiniMax M2.5 Free），就能免費使用。適合測試和輕度使用。</p>
</blockquote>
<h4>2.2.3 編輯與復原</h4>
<table>
<thead>
<tr>
<th>命令</th>
<th>功能</th>
<th>使用場景</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/undo</code></td>
<td>還原上一步修改</td>
<td>AI 改壞程式碼時緊急還原</td>
</tr>
<tr>
<td><code>/redo</code></td>
<td>重做</td>
<td>後悔還原時用</td>
</tr>
<tr>
<td><code>/copy</code></td>
<td>複製內容到剪貼簿</td>
<td>快速複製 AI 產生的程式碼或回覆</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!info] 還原的範圍<br />
<code>/undo</code> 還原的是<strong>檔案修改</strong>，不是對話內容。如果 AI 幫你改了三個檔案，輸入 <code>/undo</code> 可以逐步回退這些變更。</p>
</blockquote>
<h3>2.3 進階命令：效率翻倍</h3>
<p>掌握基礎後，這些命令能讓你的工作流程更加流暢。</p>
<h4>2.3.1 介面控制</h4>
<table>
<thead>
<tr>
<th>命令</th>
<th>功能</th>
<th>對應快捷鍵</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/editor</code></td>
<td>開啟編輯器</td>
<td><code>&lt;leader&gt; + e</code></td>
</tr>
<tr>
<td><code>/themes</code></td>
<td>切換主題</td>
<td><code>&lt;leader&gt; + t</code></td>
</tr>
<tr>
<td><code>/status</code></td>
<td>狀態檢視</td>
<td><code>&lt;leader&gt; + s</code></td>
</tr>
<tr>
<td><code>/agents</code></td>
<td>Agent 列表</td>
<td><code>&lt;leader&gt; + a</code></td>
</tr>
</tbody>
</table>
<h4>2.3.2 Skills（技能系統）</h4>
<p>Skills 是 OpenCode 的「外掛腳本」，讓 AI 掌握特定領域的能力。</p>
<table>
<thead>
<tr>
<th>命令</th>
<th>功能</th>
<th>範例</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/skills</code></td>
<td>列出所有可用 Skills</td>
<td>查看已安裝的技能</td>
</tr>
<tr>
<td><code>/&lt;skill-name&gt;</code></td>
<td>呼叫特定 Skill</td>
<td><code>/obsidian-cli</code> 啟用 Obsidian CLI 技能</td>
</tr>
</tbody>
</table>
<p><strong>常用 Skills 推薦</strong>：</p>
<table>
<thead>
<tr>
<th>Skill 名稱</th>
<th>用途</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>obsidian-markdown</code></td>
<td>處理 Obsidian 專屬 Markdown 語法</td>
</tr>
<tr>
<td><code>obsidian-bases</code></td>
<td>建立資料庫視圖（.base 檔案）</td>
</tr>
<tr>
<td><code>json-canvas</code></td>
<td>建立視覺化畫布（.canvas 檔案）</td>
</tr>
<tr>
<td><code>ui-ux-pro-max</code></td>
<td>前端 UI/UX 設計輔助</td>
</tr>
</tbody>
</table>
<h3>2.4 實用技巧：讓斜線命令更好用</h3>
<h4>2.4.1 @ 提及檔案</h4>
<p>在輸入框中輸入 <strong><code>@</code></strong> 會出現工作目錄的檔案清單，輸入部分檔名即可快速篩選。</p>
<pre><code>請幫我檢查 @index.jsp 裡的 SQL 注入漏洞</code></pre>
<h4>2.4.2 多行輸入不誤送</h4>
<ul>
<li><strong>換行</strong>：<code>Shift + Enter</code> 或 <code>Ctrl + J</code>（最穩定）</li>
<li><strong>送出</strong>：<code>Enter</code></li>
<li><strong>清除</strong>：<code>Ctrl + C</code></li>
</ul>
<blockquote>
<p>[!warning] 最常犯的錯<br />
打多行 prompt 時不小心按到 <code>Enter</code> 導致訊息提前送出。<strong>養成習慣：換行用 <code>Shift + Enter</code></strong>。</p>
</blockquote>
<h4>2.4.3 命令面板</h4>
<p>按 <strong><code>Ctrl + P</code></strong> 開啟命令面板，可以用方向鍵選擇，不用死背命令名稱。</p>
<h4>2.4.4 自訂命令（Custom Commands）</h4>
<p>你可以建立自己的斜線命令，把常用提示詞（prompt）封裝成一鍵呼叫。有兩種定義方式：</p>
<h5>2.4.4.1 Markdown 檔案（推薦）</h5>
<p>在以下目錄建立 <code>.md</code> 檔案，檔名即命令名稱：</p>
<table>
<thead>
<tr>
<th>目錄</th>
<th>作用範圍</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.opencode/commands/</code></td>
<td><strong>專案層級</strong>（只在該專案可用）</td>
</tr>
<tr>
<td><code>~/.config/opencode/commands/</code></td>
<td><strong>全域</strong>（所有專案皆可用）</td>
</tr>
</tbody>
</table>
<pre><code class="language-markdown">---
description: 程式碼審查
agent: plan
model: anthropic/claude-sonnet-4-20250514
---

請對當前檔案進行程式碼審查，關注以下方面：
1. 潛在的效能問題
2. 安全漏洞
3. 程式碼可讀性
4. 最佳實踐遵循情況</code></pre>
<blockquote>
<p>[!info] frontmatter 可選欄位</p>
<ul>
<li><code>description</code>：命令說明（在 TUI 中顯示）</li>
<li><code>agent</code>：指定由哪個 Agent 執行（如 <code>build</code>、<code>plan</code>）</li>
<li><code>model</code>：覆寫預設模型</li>
<li><code>subtask</code>：設為 <code>true</code> 時，強制以子代理執行（不汙染主上下文）</li>
</ul>
<p>只有 <strong>template（提示詞內容）</strong> 是必填的，其餘皆可選。</p>
</blockquote>
<h5>2.4.4.2 JSON 設定</h5>
<p>也可以在 <code>opencode.json</code> 中用 JSON 定義：</p>
<pre><code class="language-json">{
  &quot;command&quot;: {
    &quot;review&quot;: {
      &quot;template&quot;: &quot;請對當前檔案進行程式碼審查，關注以下方面：\n1. 潛在的效能問題\n2. 安全漏洞\n3. 程式碼可讀性\n4. 最佳實踐遵循情況&quot;,
      &quot;description&quot;: &quot;程式碼審查&quot;,
      &quot;agent&quot;: &quot;plan&quot;,
      &quot;model&quot;: &quot;anthropic/claude-sonnet-4-20250514&quot;
    }
  }
}</code></pre>
<h4>2.4.5 參數傳遞</h4>
<p>使用 <code>$ARGUMENTS</code> 將命令後的文字傳入提示詞：</p>
<pre><code class="language-markdown">---
description: 建立新元件
---

使用 TypeScript 建立一個名為 $ARGUMENTS 的 React 元件，包含適當的型別定義與基本結構。</code></pre>
<p>執行 <code>/component Button</code> 時，<code>$ARGUMENTS</code> 會被替換為 <code>Button</code>。</p>
<p>也可以用位置參數取得個別參數（<code>$1</code>、<code>$2</code>、<code>$3</code>…）：</p>
<pre><code class="language-markdown">---
description: 建立檔案
---

在 $2 目錄中建立名為 $1 的檔案，內容如下：$3</code></pre>
<pre><code class="language-bash">/create-file config.json src "{ \"key\": \"value\" }"</code></pre>
<p>````</p>
<ul>
<li>`$1` → `config.json`</li>
<li>`$2` → `src`</li>
<li>`$3` → `{ &quot;key&quot;: &quot;value&quot; }`</li>
</ul>
<h4>2.4.6 Shell 命令注入</h4>
<p>使用 `!\`command\`` 語法將 Bash 命令輸出嵌入提示詞：</p>
<pre><code class="language-markdown">---
description: 分析測試覆蓋率
---

以下是當前測試結果：
!\<code>npm test\</code>

根據以上結果，建議如何提高測試覆蓋率。</code></pre>
<pre><code class="language-markdown">---
description: 審查最近的變更
---

最近 Git 提交紀錄：
!\<code>git log --oneline -10\</code>

審查這些變更並提出改進建議。</code></pre>
<p>命令會在專案根目錄執行，輸出直接成為提示詞的一部分。</p>
<h4>2.4.7 檔案參照</h4>
<p>使用 `@` 在命令中參照檔案：</p>
<pre><code class="language-markdown">---
description: 審查元件
---

審查 @src/components/Button.tsx 元件。
檢查效能問題並提出改進建議。</code></pre>
<p>檔案內容會自動被包含在提示詞中。</p>
<blockquote>
<p>[!warning] 自訂命令 vs 內建命令<br />
如果你定義了和內建命令同名的自訂命令（例如自訂的 <code>/undo</code>），<strong>自訂命令會覆寫內建命令</strong>。命名前務必確認不會誤蓋重要功能。</p>
</blockquote>
<h3>2.5 速查表：常用斜線命令一覽</h3>
<table>
<thead>
<tr>
<th>類別</th>
<th>命令</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>會話</strong></td>
<td><code>/new</code>, <code>/clear</code></td>
<td>新對話</td>
</tr>
<tr>
<td></td>
<td><code>/sessions</code></td>
<td>對話列表</td>
</tr>
<tr>
<td></td>
<td><code>/timeline</code></td>
<td>時間線</td>
</tr>
<tr>
<td></td>
<td><code>/export</code></td>
<td>匯出</td>
</tr>
<tr>
<td></td>
<td><code>/compact</code></td>
<td>壓縮上下文</td>
</tr>
<tr>
<td></td>
<td><code>/share</code></td>
<td>分享 Session</td>
</tr>
<tr>
<td></td>
<td><code>/exit</code>, <code>/quit</code>, <code>:q</code></td>
<td>離開</td>
</tr>
<tr>
<td><strong>模型</strong></td>
<td><code>/models</code></td>
<td>模型列表</td>
</tr>
<tr>
<td></td>
<td><code>/context</code></td>
<td>Token 用量</td>
</tr>
<tr>
<td><strong>編輯</strong></td>
<td><code>/undo</code></td>
<td>還原</td>
</tr>
<tr>
<td></td>
<td><code>/redo</code></td>
<td>重做</td>
</tr>
<tr>
<td></td>
<td><code>/copy</code></td>
<td>複製</td>
</tr>
<tr>
<td><strong>介面</strong></td>
<td><code>/editor</code></td>
<td>編輯器</td>
</tr>
<tr>
<td></td>
<td><code>/themes</code></td>
<td>主題</td>
</tr>
<tr>
<td></td>
<td><code>/status</code></td>
<td>狀態</td>
</tr>
<tr>
<td></td>
<td><code>/agents</code></td>
<td>Agent 列表</td>
</tr>
<tr>
<td><strong>進階</strong></td>
<td><code>/skills</code></td>
<td>技能列表</td>
</tr>
<tr>
<td></td>
<td><code>/&lt;skill&gt;</code></td>
<td>呼叫技能</td>
</tr>
<tr>
<td></td>
<td><code>/help</code></td>
<td>顯示說明</td>
</tr>
<tr>
<td></td>
<td><code>/init</code></td>
<td>初始化 AGENTS.md</td>
</tr>
<tr>
<td></td>
<td><code>/start-work</code></td>
<td>開始執行計畫</td>
</tr>
<tr>
<td></td>
<td><code>/ulw</code></td>
<td>Ultrawork 模式</td>
</tr>
<tr>
<td></td>
<td><code>/refactor</code></td>
<td>智慧重構</td>
</tr>
<tr>
<td></td>
<td><code>/handoff</code></td>
<td>建立交接文件</td>
</tr>
</tbody>
</table>
<h2>3 相關鏈接</h2>
<ul>
<li><a href="https://opencode.ai/docs/zh-tw/" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">OpenCode 官方文件（繁體中文）<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li>
<li><a href="https://opencode.ai/docs/zh-tw/keybinds/" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">OpenCode 官方快捷鍵文件<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li>
<li><a href="https://zhuanlan.zhihu.com/p/1996053344448434990" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Obsidian + OpenCode 知識管理組合<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li>
</ul>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> [解說文章(繁體中文)]()<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<h2>4 教學影片</h2>
<p><a href="https://youtu.be/fkLr0diCMrk" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">https://youtu.be/fkLr0diCMrk<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p><iframe width="650" height="315" src="https://www.youtube.com/embed/fkLr0diCMrk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4" rel="bookmark" title="以OpenCode連接GPT模型時發生錯誤" target="_blank" data-wpel-link="internal">以OpenCode連接GPT模型時發生錯誤</a>  (0則留言, 2026/03/26)</li>
<li><a href="https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode" rel="bookmark" title="如何在OpenCode裡使用更多的免費大語言模型？" target="_blank" data-wpel-link="internal">如何在OpenCode裡使用更多的免費大語言模型？</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" rel="bookmark" title="90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類" target="_blank" data-wpel-link="internal">90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類</a>  (0則留言, 2026/04/25)</li>
<li><a href="https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server" rel="bookmark" title="透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server" target="_blank" data-wpel-link="internal">透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study" rel="bookmark" title="AI 爆發時代的產品命名學" target="_blank" data-wpel-link="internal">AI 爆發時代的產品命名學</a>  (0則留言, 2026/04/02)</li>
<li><a href="https://jdev.tw/blog/8245/stabilitymatrix-models-webui-operations" rel="bookmark" title="SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作" target="_blank" data-wpel-link="internal">SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作</a>  (2則留言, 2023/10/29)</li>
<li><a href="https://jdev.tw/blog/8385/obsidian-copilot-local-llms-ollama2-lm-studio" rel="bookmark" title="Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio" target="_blank" data-wpel-link="internal">Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio</a>  (0則留言, 2024/03/17)</li>
<li><a href="https://jdev.tw/blog/8239/stabilitymatrix-install-stable-diffusikon-quicklyh" rel="bookmark" title="SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具" target="_blank" data-wpel-link="internal">SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具</a>  (2則留言, 2023/10/22)</li>
<li><a href="https://jdev.tw/blog/8253/stable-diffusion-oldsix-prompt-extension" rel="bookmark" title="SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學" target="_blank" data-wpel-link="internal">SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學</a>  (0則留言, 2023/11/11)</li>
<li><a href="https://jdev.tw/blog/5305/mattermost-slash-command-with-autohotkey" rel="bookmark" title="[Mattermost 教學#5] 方便的斜線命令與AutoHotkey" target="_blank" data-wpel-link="internal">[Mattermost 教學#5] 方便的斜線命令與AutoHotkey</a>  (2則留言, 2018/04/17)</li>
<li><a href="https://jdev.tw/blog/8788/quick-select-obsidian-menu-useful-tips" rel="bookmark" title="快速選擇Obsidian選單：Quick Select外掛的實用技巧" target="_blank" data-wpel-link="internal">快速選擇Obsidian選單：Quick Select外掛的實用技巧</a>  (0則留言, 2025/04/24)</li>
<li><a href="https://jdev.tw/blog/8289/slash-commander-plugin" rel="bookmark" title="Obs148｜Slash Commander 斜線命令快速插入表格、Callouts、程式碼區塊等" target="_blank" data-wpel-link="internal">Obs148｜Slash Commander 斜線命令快速插入表格、Callouts、程式碼區塊等</a>  (0則留言, 2023/12/31)</li>
<li><a href="https://jdev.tw/blog/8333/autohotkey-settings-and-code-snippets-with-vs-code" rel="bookmark" title="AHK60｜AutoHotkey++擴充設定詳解與Code Snippets設置；使用VS Code" target="_blank" data-wpel-link="internal">AHK60｜AutoHotkey++擴充設定詳解與Code Snippets設置；使用VS Code</a>  (0則留言, 2024/02/24)</li>
<li><a href="https://jdev.tw/blog/8035/whisperdesktop-gpu-enabled" rel="bookmark" title="能使用GPU的OpenAI Whisper語音識別工具(ASR)，超快超準確：WhisperDesktop" target="_blank" data-wpel-link="internal">能使用GPU的OpenAI Whisper語音識別工具(ASR)，超快超準確：WhisperDesktop</a>  (9則留言, 2023/03/16)</li>
<li><a href="https://jdev.tw/blog/5567/dir-directrory" rel="bookmark" title="dir (DIRectrory)命令 顯示目錄裡的檔案 (初學者的命令行 #3)" target="_blank" data-wpel-link="internal">dir (DIRectrory)命令 顯示目錄裡的檔案 (初學者的命令行 #3)</a>  (0則留言, 2019/04/05)</li>
</ul>
<p><!-- Similar Posts took 101.328 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類</title>
		<link>https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification</link>
					<comments>https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Sat, 25 Apr 2026 14:00:52 +0000</pubDate>
				<category><![CDATA[AI-Agent(OpenCode)]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[opencode]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9201</guid>

					<description><![CDATA[1. 前言 OpenCode 是一個開源於 GitHub 的 AI 代理，幫助你在終端機、IDE 或桌面端編寫程式碼。它甚至也有網頁模式（只要用 opencode web 啟動即可）。 OpenCod&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9201" class="pvc_stats all  " data-element-id="9201" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<h2>1. 前言</h2>
<p>OpenCode 是一個開源於 GitHub 的 AI 代理，幫助你在終端機、IDE 或桌面端編寫程式碼。它甚至也有網頁模式（只要用 <code>opencode web</code> 啟動即可）。</p>
<p><span id="more-9201"></span></p>
<p>OpenCode 的 TUI（Text User Interface，文字使用介面）是它最強大的使用方式之一。但很多人打開之後只會打字 + Enter，不知道裡面藏了一套完整的快捷鍵系統。這篇文章會從畫面佈局開始，然後把所有輸入區的按鍵按照「操作思維」分類，讓你用最短的時間上手。</p>
<blockquote>
<p>[!info] 本文依據<br />
本文快捷鍵資訊基於 <a href="https://opencode.ai/docs/zh-tw/keybinds/" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">OpenCode 官方快捷鍵文件<span class="wpel-icon wpel-image wpel-icon-6"></span></a>（最後更新：2026年4月24日），並結合個人 <code>tui.json</code> 自訂設定。</p>
</blockquote>
<h2>2. TUI 畫面佈局</h2>
<p>OpenCode TUI 的主畫面分成下列幾個主要區域：</p>
<p><img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1777100981000vtnd26.png" alt="gh|700" /></p>
<ul>
<li><strong>訊息區</strong>：累積了你輸入的提示文字、AI 的思考回應、工具輸出等對話內容</li>
<li><strong>輸入區</strong>：多行輸入框，支援完整的 Readline/Emacs 風格快捷鍵</li>
<li><strong>狀態列</strong>：顯示目前 Session 名稱、模型、Agent 模式等資訊</li>
<li><strong>Sidebar</strong>（可選）：右側面板，顯示檔案總管、工具清單等</li>
</ul>
<h2>3. 自訂按鍵</h2>
<p>TUI 的設定檔是 <code>tui.json</code>，位於 OpenCode 設定目錄中：</p>
<ul>
<li>Windows: <code>%USERPROFILE%/.config/opencode/tui.json</code></li>
<li>macOS/Linux: <code>~/.config/opencode/tui.json</code></li>
</ul>
<p>你可以透過修改 <code>keybinds</code> 區塊來自訂所有快捷鍵。將某個動作設為 <code>&quot;none&quot;</code> 即可停用該快捷鍵。</p>
<h3>3.1. 我的 tui.json 設定</h3>
<blockquote>
<p>[!note] 自訂設定<br />
以下按鍵已被我修改過，預設按鍵可查看 <a href="https://opencode.ai/docs/zh-tw/keybinds/" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">官方快捷鍵文件<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
</blockquote>
<pre><code class="language-json">{
  &quot;$schema&quot;: &quot;https://opencode.ai/tui.json&quot;,
  &quot;theme&quot;: &quot;catppuccin&quot;,
  &quot;keybinds&quot;: {
    &quot;leader&quot;: &quot;ctrl+x&quot;,
    &quot;app_exit&quot;: &quot;ctrl+c,&lt;leader&gt;q&quot;,
    &quot;editor_open&quot;: &quot;&lt;leader&gt;e&quot;,
    &quot;theme_list&quot;: &quot;&lt;leader&gt;t&quot;,
    &quot;sidebar_toggle&quot;: &quot;&lt;leader&gt;b&quot;,
    &quot;scrollbar_toggle&quot;: &quot;none&quot;,
    &quot;username_toggle&quot;: &quot;none&quot;,
    &quot;status_view&quot;: &quot;&lt;leader&gt;s&quot;,
    &quot;tool_details&quot;: &quot;none&quot;,
    &quot;session_export&quot;: &quot;&lt;leader&gt;x&quot;,
    &quot;session_new&quot;: &quot;&lt;leader&gt;n&quot;,
    &quot;session_list&quot;: &quot;&lt;leader&gt;l&quot;,
    &quot;session_timeline&quot;: &quot;&lt;leader&gt;g&quot;,
    &quot;session_fork&quot;: &quot;none&quot;,
    &quot;session_rename&quot;: &quot;none&quot;,
    &quot;session_share&quot;: &quot;none&quot;,
    &quot;session_unshare&quot;: &quot;none&quot;,
    &quot;session_interrupt&quot;: &quot;escape&quot;,
    &quot;session_compact&quot;: &quot;&lt;leader&gt;c&quot;,
    &quot;session_child_first&quot;: &quot;&lt;leader&gt;down&quot;,
    &quot;session_child_cycle&quot;: &quot;&lt;leader&gt;right&quot;,
    &quot;session_child_cycle_reverse&quot;: &quot;&lt;leader&gt;left&quot;,
    &quot;session_parent&quot;: &quot;&lt;leader&gt;up&quot;,
    &quot;messages_page_up&quot;: &quot;pageup,ctrl+alt+b&quot;,
    &quot;messages_page_down&quot;: &quot;pagedown,ctrl+alt+f&quot;,
    &quot;messages_line_up&quot;: &quot;up&quot;,
    &quot;messages_line_down&quot;: &quot;down&quot;,
    &quot;messages_half_page_up&quot;: &quot;alt+pageup&quot;,
    &quot;messages_half_page_down&quot;: &quot;alt+pgdown&quot;,
    &quot;messages_first&quot;: &quot;ctrl+home&quot;,
    &quot;messages_last&quot;: &quot;ctrl+end&quot;,
    &quot;messages_next&quot;: &quot;alt+down&quot;,
    &quot;messages_previous&quot;: &quot;alt+up&quot;,
    &quot;messages_copy&quot;: &quot;&lt;leader&gt;y&quot;,
    &quot;messages_undo&quot;: &quot;&lt;leader&gt;u&quot;,
    &quot;messages_redo&quot;: &quot;&lt;leader&gt;r&quot;,
    &quot;messages_last_user&quot;: &quot;none&quot;,
    &quot;messages_toggle_conceal&quot;: &quot;&lt;leader&gt;h&quot;,
    &quot;model_list&quot;: &quot;&lt;leader&gt;m&quot;,
    &quot;model_cycle_recent&quot;: &quot;f2&quot;,
    &quot;model_cycle_recent_reverse&quot;: &quot;shift+f2&quot;,
    &quot;model_cycle_favorite&quot;: &quot;none&quot;,
    &quot;model_cycle_favorite_reverse&quot;: &quot;none&quot;,
    &quot;variant_cycle&quot;: &quot;ctrl+t&quot;,
    &quot;variant_list&quot;: &quot;none&quot;,
    &quot;command_list&quot;: &quot;ctrl+p&quot;,
    &quot;agent_list&quot;: &quot;&lt;leader&gt;a&quot;,
    &quot;agent_cycle&quot;: &quot;tab&quot;,
    &quot;agent_cycle_reverse&quot;: &quot;shift+tab&quot;,
    &quot;input_clear&quot;: &quot;ctrl+c&quot;,
    &quot;input_paste&quot;: &quot;ctrl+v&quot;,
    &quot;input_submit&quot;: &quot;return&quot;,
    &quot;input_newline&quot;: &quot;ctrl+return,shift+return,ctrl+j&quot;,
    &quot;input_move_left&quot;: &quot;left,ctrl+b&quot;,
    &quot;input_move_right&quot;: &quot;right,ctrl+f&quot;,
    &quot;input_move_up&quot;: &quot;ctrl+1&quot;,
    &quot;input_move_down&quot;: &quot;ctrl+2&quot;,
    &quot;input_select_left&quot;: &quot;shift+left&quot;,
    &quot;input_select_right&quot;: &quot;shift+right&quot;,
    &quot;input_select_up&quot;: &quot;shift+up&quot;,
    &quot;input_select_down&quot;: &quot;shift+down&quot;,
    &quot;input_line_home&quot;: &quot;ctrl+a&quot;,
    &quot;input_line_end&quot;: &quot;ctrl+e&quot;,
    &quot;input_select_line_home&quot;: &quot;ctrl+shift+a&quot;,
    &quot;input_select_line_end&quot;: &quot;ctrl+shift+e&quot;,
    &quot;input_visual_line_home&quot;: &quot;alt+a&quot;,
    &quot;input_visual_line_end&quot;: &quot;alt+e&quot;,
    &quot;input_select_visual_line_home&quot;: &quot;alt+shift+a&quot;,
    &quot;input_select_visual_line_end&quot;: &quot;alt+shift+e&quot;,
    &quot;input_buffer_home&quot;: &quot;home&quot;,
    &quot;input_buffer_end&quot;: &quot;end&quot;,
    &quot;input_select_buffer_home&quot;: &quot;shift+home&quot;,
    &quot;input_select_buffer_end&quot;: &quot;shift+end&quot;,
    &quot;input_delete_line&quot;: &quot;ctrl+y&quot;,
    &quot;input_delete_to_line_end&quot;: &quot;ctrl+k&quot;,
    &quot;input_delete_to_line_start&quot;: &quot;ctrl+u&quot;,
    &quot;input_backspace&quot;: &quot;backspace,shift+backspace&quot;,
    &quot;input_delete&quot;: &quot;delete,shift+delete&quot;,
    &quot;input_undo&quot;: &quot;ctrl+z&quot;,
    &quot;input_redo&quot;: &quot;ctrl+.,super+shift+z&quot;,
    &quot;input_word_forward&quot;: &quot;alt+f,alt+right,ctrl+right&quot;,
    &quot;input_word_backward&quot;: &quot;alt+b,alt+left,ctrl+left&quot;,
    &quot;input_select_word_forward&quot;: &quot;alt+shift+f,alt+shift+right&quot;,
    &quot;input_select_word_backward&quot;: &quot;alt+shift+b,alt+shift+left&quot;,
    &quot;input_delete_word_forward&quot;: &quot;alt+d,alt+delete,ctrl+delete&quot;,
    &quot;input_delete_word_backward&quot;: &quot;ctrl+w,ctrl+backspace,alt+backspace&quot;,
    &quot;history_previous&quot;: &quot;ctrl+up&quot;,
    &quot;history_next&quot;: &quot;ctrl+down&quot;,
    &quot;terminal_suspend&quot;: &quot;&quot;,
    &quot;terminal_title_toggle&quot;: &quot;none&quot;,
    &quot;tips_toggle&quot;: &quot;&lt;leader&gt;h&quot;,
    &quot;display_thinking&quot;: &quot;none&quot;
  },
  &quot;scroll_speed&quot;: 3,
  &quot;scroll_acceleration&quot;: {
    &quot;enabled&quot;: true
  },
  &quot;diff_style&quot;: &quot;auto&quot;,
  &quot;mouse&quot;: true,
  &quot;plugin&quot;: [],
  &quot;plugin_enabled&quot;: {}
}</code></pre>
<h3>3.2. Leader Key（前導鍵）</h3>
<blockquote>
<p>[!tip] 什麼是前導鍵？<br />
OpenCode 的大多數快捷鍵使用 <strong>Leader（前導鍵）</strong>，預設為 <code>Ctrl+X</code>。這可以避免與終端機中的其他快捷鍵衝突。操作方式是：先按前導鍵，再按對應的快捷鍵。例如新建 Session：先按 <code>Ctrl+X</code>，放開後再按 <code>N</code>。</p>
</blockquote>
<table>
<thead>
<tr>
<th>組合鍵</th>
<th>功能</th>
<th>對應斜線命令</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&lt;leader&gt; B</code></td>
<td>切換 Sidebar 顯示</td>
<td></td>
</tr>
<tr>
<td><code>&lt;leader&gt; E</code></td>
<td>開啟編輯器</td>
<td><code>/editor</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; M</code></td>
<td>模型列表</td>
<td><code>/models</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; S</code></td>
<td>狀態檢視</td>
<td><code>/status</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; T</code></td>
<td>主題切換</td>
<td><code>/themes</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; N</code></td>
<td>新增 Session</td>
<td><code>/new</code> 或 <code>/clear</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; L</code></td>
<td>Session 列表</td>
<td><code>/sessions</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; G</code></td>
<td>Session 時間線</td>
<td><code>/timeline</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; X</code></td>
<td>匯出 Session</td>
<td><code>/export</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; C</code></td>
<td>壓縮對話上下文</td>
<td><code>/compact</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; A</code></td>
<td>Agent 列表</td>
<td><code>/agents</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; H</code></td>
<td>顯示/隱藏提示</td>
<td></td>
</tr>
<tr>
<td><code>&lt;leader&gt; Q</code></td>
<td>離開應用程式</td>
<td><code>/exit</code> 或 <code>/quit</code> 或 <code>:q</code> 或 <code>quit</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; U</code></td>
<td>訊息區 Undo</td>
<td><code>/undo</code></td>
</tr>
<tr>
<td><code>&lt;leader&gt; R</code></td>
<td>訊息區 Redo</td>
<td></td>
</tr>
<tr>
<td><code>&lt;leader&gt; Y</code></td>
<td>複製訊息</td>
<td><code>/copy</code></td>
</tr>
</tbody>
</table>
<h3>3.3. 模式切換</h3>
<ul>
<li><code>Tab</code> / <code>Shift + Tab</code>：在 Build 模式（執行程式）和 Plan 模式（規劃架構）之間切換</li>
<li><code>F2</code> / <code>Shift + F2</code>：循環切換最近使用的模型</li>
<li><code>Ctrl + P</code>：開啟命令面板</li>
<li><code>Ctrl + T</code>：循環切換模型變體（variant），low、medium、high等切換</li>
</ul>
<h2>4. 輸入區按鍵完整分類</h2>
<p>以下將輸入區所有快捷鍵，依操作思維分為七大類。記住分類遠比死背個別按鍵有效。</p>
<h3>4.1. 第 1 類：提交與清除</h3>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
<th>說明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Enter</code></td>
<td>送出訊息</td>
<td></td>
</tr>
<tr>
<td><code>Shift + Enter</code></td>
<td>換行（不送出）</td>
<td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Windows Terminal 可能需要額外設定（見下方）</td>
</tr>
<tr>
<td><code>Ctrl + Enter</code></td>
<td>換行（不送出）</td>
<td></td>
</tr>
<tr>
<td><code>Alt + Enter</code></td>
<td>換行（不送出）</td>
<td>Windows 終端機可能無效</td>
</tr>
<tr>
<td><code>Ctrl + J</code></td>
<td>換行（不送出）</td>
<td>推薦使用，最穩定</td>
</tr>
<tr>
<td><code>Ctrl + C</code></td>
<td>清除整行</td>
<td>也可中止 AI 回應，建議修改</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!warning] 新手最常犯的錯<br />
在輸入多行 prompt 時，不小心按到 <code>Enter</code> 而非 <code>Shift + Enter</code>，導致訊息還沒寫完就送出去了。<strong>養成習慣：換行用 <code>Shift + Enter</code> 或 <code>Ctrl + J</code>。</strong></p>
<p>[!tip] Windows Terminal 的 Shift+Enter 設定<br />
某些終端機預設不會發送帶修飾鍵的 Enter 鍵。如果你發現 <code>Shift + Enter</code> 沒反應，需要在 Windows Terminal 的 <code>settings.json</code> 中設定：</p>
<p>在 <code>actions</code> 陣列中加入：</p>
<pre><code class="language-json">{
  "command": { "action": "sendInput", "input": "\u001b[13;2u" },
  "id": "User.sendInput.ShiftEnterCustom"
}</code></pre>
<p>在 <code>keybindings</code> 陣列中加入：</p>
<pre><code class="language-json">{ "keys": "shift+enter", "id": "User.sendInput.ShiftEnterCustom" }</code></pre>
<p>儲存後重新啟動 Windows Terminal 即可。</p>
</blockquote>
<h3>4.2. 第 2 類：游標移動</h3>
<p>OpenCode 輸入區完整支援 Bash/Readline 風格的快捷鍵，熟悉終端機的人可以無縫上手。</p>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>動作</th>
<th>記憶口訣</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>←</code> / <code>Ctrl + B</code></td>
<td>向左一字元</td>
<td><strong>B</strong>ackward</td>
</tr>
<tr>
<td><code>→</code> / <code>Ctrl + F</code></td>
<td>向右一字元</td>
<td><strong>F</strong>orward</td>
</tr>
<tr>
<td><code>↑</code></td>
<td>向上一行</td>
<td></td>
</tr>
<tr>
<td><code>↓</code></td>
<td>向下一行</td>
<td></td>
</tr>
<tr>
<td><code>Ctrl + A</code></td>
<td>移到行首</td>
<td><strong>A</strong> = 頭</td>
</tr>
<tr>
<td><code>Ctrl + E</code></td>
<td>移到行尾</td>
<td><strong>E</strong> = <strong>E</strong>nd</td>
</tr>
<tr>
<td><code>Home</code></td>
<td>移到緩衝區最前面</td>
<td></td>
</tr>
<tr>
<td><code>End</code></td>
<td>移到緩衝區最後面</td>
<td></td>
</tr>
<tr>
<td><code>Alt + A</code></td>
<td>移到視覺行首</td>
<td>visual line</td>
</tr>
<tr>
<td><code>Alt + E</code></td>
<td>移到視覺行尾</td>
<td>visual line</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>核心記憶法</strong>：<code>Ctrl + A/E</code> 是行首/行尾（最常用），<code>Home/End</code> 是整個輸入區的最前/最後。輸入區有多行內容時，這幾個按鍵才能看出差異。</p>
</blockquote>
<h3>4.3. 第 3 類：文字選取</h3>
<p>規則只有一條：<strong>任何移動鍵 + <code>Shift</code> = 選取</strong>。</p>
<table>
<thead>
<tr>
<th>移動鍵</th>
<th>+ Shift 變成選取</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>←</code> / <code>→</code></td>
<td><code>Shift + ←</code> / <code>Shift + →</code> 選取字元</td>
</tr>
<tr>
<td><code>↑</code> / <code>↓</code></td>
<td><code>Shift + ↑</code> / <code>Shift + ↓</code> 選取行</td>
</tr>
<tr>
<td><code>Ctrl + A</code></td>
<td><code>Ctrl + Shift + A</code> 選取到行首</td>
</tr>
<tr>
<td><code>Ctrl + E</code></td>
<td><code>Ctrl + Shift + E</code> 選取到行尾</td>
</tr>
<tr>
<td><code>Home</code> / <code>End</code></td>
<td><code>Shift + Home</code> / <code>Shift + End</code> 選取到緩衝區首尾</td>
</tr>
<tr>
<td><code>Alt + A</code> / <code>Alt + E</code></td>
<td><code>Alt + Shift + A</code> / <code>Alt + Shift + E</code> 選取到視覺行首尾</td>
</tr>
<tr>
<td><code>Alt + ←</code> / <code>Alt + →</code></td>
<td><code>Alt + Shift + ←</code> / <code>Alt + Shift + →</code> 選取一個單字</td>
</tr>
</tbody>
</table>
<h3>4.4. 第 4 類：刪除操作</h3>
<p>刪除操作是 OpenCode 輸入區最強大的部分，支援多種粒度的刪除。</p>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
<th>等級</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Backspace</code></td>
<td>刪除游標前一字元</td>
<td>字元</td>
</tr>
<tr>
<td><code>Ctrl + D</code> / <code>Delete</code></td>
<td>刪除游標所在字元</td>
<td>字元</td>
</tr>
<tr>
<td><code>Ctrl + W</code> / <code>Ctrl + Backspace</code> / <code>Alt + Backspace</code></td>
<td>刪除前一個英文單字</td>
<td>單字</td>
</tr>
<tr>
<td><code>Alt + D</code> / <code>Alt + Delete</code> / <code>Ctrl + Delete</code></td>
<td>刪除後一個英文單字</td>
<td>單字</td>
</tr>
<tr>
<td><code>Ctrl + K</code></td>
<td>刪除游標到行尾</td>
<td>行</td>
</tr>
<tr>
<td><code>Ctrl + U</code></td>
<td>刪除游標到行首</td>
<td>行</td>
</tr>
<tr>
<td><code>Ctrl+Shift+D</code></td>
<td>刪除整行</td>
<td>行</td>
</tr>
</tbody>
</table>
<h3>4.5. 第 5 類：字詞跳躍</h3>
<p>英文環境下特別好用，以「單字」為單位跳躍游標。</p>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Alt + F</code> / <code>Alt + →</code> / <code>Ctrl + →</code></td>
<td>向前一個單字</td>
</tr>
<tr>
<td><code>Alt + B</code> / <code>Alt + ←</code> / <code>Ctrl + ←</code></td>
<td>向後一個單字</td>
</tr>
</tbody>
</table>
<p><strong>選取版</strong>（加上 <code>Shift</code>）：</p>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Alt + Shift + F</code> / <code>Alt + Shift + →</code></td>
<td>選取到下一個單字</td>
</tr>
<tr>
<td><code>Alt + Shift + B</code> / <code>Alt + Shift + ←</code></td>
<td>選取到上一個單字</td>
</tr>
</tbody>
</table>
<h3>4.6. 第 6 類：歷史記錄</h3>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>↑</code></td>
<td>上一筆輸入過的內容</td>
</tr>
<tr>
<td><code>↓</code></td>
<td>下一筆輸入過的內容</td>
</tr>
</tbody>
</table>
<blockquote>
<p>OpenCode 會記住你在當前 session 中的所有輸入，用上下鍵就能快速找回之前打過的 prompt。</p>
</blockquote>
<h3>4.7. 第 7 類：復原、重做、貼上與其他編輯</h3>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Ctrl + -</code> / <code>Ctrl + Z</code> / <code>Super + Z</code></td>
<td>復原（undo）</td>
</tr>
<tr>
<td><code>Ctrl + .</code> / <code>Super + Shift + Z</code></td>
<td>重做（redo）</td>
</tr>
<tr>
<td><code>Ctrl + V</code></td>
<td>貼上</td>
</tr>
<tr>
<td><code>Ctrl + T</code></td>
<td>交換游標前後字元（transpose）</td>
</tr>
<tr>
<td><code>Ctrl + G</code></td>
<td>取消彈出視窗 / 中止正在執行的回應</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!note] 桌面版提示詞輸入快捷鍵<br />
OpenCode 桌面應用程式的提示詞輸入框支援常見的 Readline/Emacs 風格文字編輯快捷鍵。這些快捷鍵為內建功能，目前無法透過 <code>opencode.json</code> 進行設定。</p>
</blockquote>
<h2>5. 訊息檢視區快捷鍵</h2>
<p>除了輸入區，訊息檢視區也有實用的快捷鍵：</p>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>PageUp</code> / <code>Ctrl + Alt + B</code></td>
<td>整頁上翻</td>
</tr>
<tr>
<td><code>PageDown</code> / <code>Ctrl + Alt + F</code></td>
<td>整頁下翻</td>
</tr>
<tr>
<td><code>Ctrl + Alt + Y</code></td>
<td>逐行向上</td>
</tr>
<tr>
<td><code>Ctrl + Alt + E</code></td>
<td>逐行向下</td>
</tr>
<tr>
<td><code>Ctrl + Alt + U</code></td>
<td>半頁向上</td>
</tr>
<tr>
<td><code>Ctrl + Alt + D</code></td>
<td>半頁向下</td>
</tr>
<tr>
<td><code>Ctrl + G</code> / <code>Home</code></td>
<td>跳到第一則訊息</td>
</tr>
<tr>
<td><code>Ctrl + Alt + G</code> / <code>End</code></td>
<td>跳到最後一則訊息</td>
</tr>
<tr>
<td><code>&lt;leader&gt; Y</code></td>
<td>複製訊息</td>
</tr>
<tr>
<td><code>&lt;leader&gt; U</code></td>
<td>訊息區 Undo</td>
</tr>
<tr>
<td><code>&lt;leader&gt; R</code></td>
<td>訊息區 Redo</td>
</tr>
<tr>
<td><code>&lt;leader&gt; H</code></td>
<td>切換隱藏/顯示內容</td>
</tr>
</tbody>
</table>
<h2>6. Session 導航</h2>
<p>OpenCode 支援巢狀 Session（子對話），可以來回切換：</p>
<table>
<thead>
<tr>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&lt;leader&gt; Down</code></td>
<td>進入第一個子 Session</td>
</tr>
<tr>
<td><code>&lt;leader&gt; Right</code></td>
<td>循環到下一個子 Session</td>
</tr>
<tr>
<td><code>&lt;leader&gt; Left</code></td>
<td>循環到上一個子 Session</td>
</tr>
<tr>
<td><code>&lt;leader&gt; Up</code></td>
<td>回到父 Session</td>
</tr>
<tr>
<td><code>Escape</code></td>
<td>中斷目前 Session</td>
</tr>
<tr>
<td><code>&lt;leader&gt; N</code></td>
<td>新增 Session</td>
</tr>
<tr>
<td><code>&lt;leader&gt; L</code></td>
<td>Session 列表</td>
</tr>
<tr>
<td><code>&lt;leader&gt; G</code></td>
<td>Session 時間線</td>
</tr>
<tr>
<td><code>&lt;leader&gt; X</code></td>
<td>匯出 Session</td>
</tr>
<tr>
<td><code>&lt;leader&gt; C</code></td>
<td>壓縮對話上下文</td>
</tr>
</tbody>
</table>
<h2>7. 結語</h2>
<p>OpenCode TUI 的快捷鍵設計源自 Bash/Readline，加上自己的 Leader Key 系統。與其死背整張表，不如理解分類邏輯——移動、選取、刪除、送出——把常用鍵融入日常操作，剩下的隨用隨查就好。</p>
<h2>8. 附錄：完整快捷鍵速查表</h2>
<table>
<thead>
<tr>
<th>類別</th>
<th>按鍵</th>
<th>功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>提交</strong></td>
<td><code>Enter</code></td>
<td>送出訊息</td>
</tr>
<tr>
<td></td>
<td><code>Shift + Enter</code> / <code>Ctrl + J</code></td>
<td>換行</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + C</code></td>
<td>清除輸入 / 中止回應</td>
</tr>
<tr>
<td><strong>移動</strong></td>
<td><code>Ctrl + A</code></td>
<td>行首</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + E</code></td>
<td>行尾</td>
</tr>
<tr>
<td></td>
<td><code>Alt + B</code> / <code>Alt + F</code></td>
<td>前/後一個單字</td>
</tr>
<tr>
<td></td>
<td><code>Home</code> / <code>End</code></td>
<td>緩衝區首/尾</td>
</tr>
<tr>
<td><strong>選取</strong></td>
<td><code>Shift + ←/→/↑/↓</code></td>
<td>選取字元/行</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + Shift + A/E</code></td>
<td>選取到行首/尾</td>
</tr>
<tr>
<td></td>
<td><code>Alt + Shift + ←/→</code></td>
<td>選取單字</td>
</tr>
<tr>
<td><strong>刪除</strong></td>
<td><code>Ctrl + K</code></td>
<td>刪到行尾</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + U</code></td>
<td>刪到行首</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + Shift + D</code></td>
<td>刪除整行</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + W</code></td>
<td>刪前一個單字</td>
</tr>
<tr>
<td></td>
<td><code>Alt + D</code></td>
<td>刪後一個單字</td>
</tr>
<tr>
<td><strong>歷史</strong></td>
<td><code>↑</code> / <code>↓</code></td>
<td>上/下一筆輸入</td>
</tr>
<tr>
<td><strong>復原</strong></td>
<td><code>Ctrl + -</code> / <code>Ctrl + Z</code></td>
<td>復原</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + .</code></td>
<td>重做</td>
</tr>
<tr>
<td><strong>貼上</strong></td>
<td><code>Ctrl + V</code></td>
<td>貼上</td>
</tr>
<tr>
<td><strong>其他</strong></td>
<td><code>Ctrl + T</code></td>
<td>交換字元</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + G</code></td>
<td>中止回應</td>
</tr>
<tr>
<td><strong>模型</strong></td>
<td><code>&lt;leader&gt; M</code></td>
<td>模型列表</td>
</tr>
<tr>
<td></td>
<td><code>F2</code></td>
<td>切換模型</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + T</code></td>
<td>切換 variant</td>
</tr>
<tr>
<td><strong>Session</strong></td>
<td><code>&lt;leader&gt; N</code></td>
<td>新增</td>
</tr>
<tr>
<td></td>
<td><code>&lt;leader&gt; C</code></td>
<td>壓縮上下文</td>
</tr>
<tr>
<td></td>
<td><code>Escape</code></td>
<td>中斷</td>
</tr>
<tr>
<td><strong>介面</strong></td>
<td><code>&lt;leader&gt; B</code></td>
<td>側邊欄</td>
</tr>
<tr>
<td></td>
<td><code>Ctrl + P</code></td>
<td>命令面板</td>
</tr>
<tr>
<td></td>
<td><code>Tab</code></td>
<td>切換 Agent</td>
</tr>
</tbody>
</table>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> [解說文章(繁體中文)]()<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<h2>9. 教學影片</h2>
<p><a href="https://youtu.be/8mgj7IxtkDg" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">https://youtu.be/8mgj7IxtkDg<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p><iframe loading="lazy" width="650" height="315" src="https://www.youtube.com/embed/8mgj7IxtkDg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" rel="bookmark" title="OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】" target="_blank" data-wpel-link="internal">OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】</a>  (0則留言, 2026/05/02)</li>
<li><a href="https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server" rel="bookmark" title="透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server" target="_blank" data-wpel-link="internal">透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4" rel="bookmark" title="以OpenCode連接GPT模型時發生錯誤" target="_blank" data-wpel-link="internal">以OpenCode連接GPT模型時發生錯誤</a>  (0則留言, 2026/03/26)</li>
<li><a href="https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode" rel="bookmark" title="如何在OpenCode裡使用更多的免費大語言模型？" target="_blank" data-wpel-link="internal">如何在OpenCode裡使用更多的免費大語言模型？</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study" rel="bookmark" title="AI 爆發時代的產品命名學" target="_blank" data-wpel-link="internal">AI 爆發時代的產品命名學</a>  (0則留言, 2026/04/02)</li>
<li><a href="https://jdev.tw/blog/5303/mattermost-shortcuts" rel="bookmark" title="[Mattermost 教學#4] Mattermost的快捷鍵" target="_blank" data-wpel-link="internal">[Mattermost 教學#4] Mattermost的快捷鍵</a>  (0則留言, 2018/04/16)</li>
<li><a href="https://jdev.tw/blog/6114/wsl2-zsh-basic-operations" rel="bookmark" title="[WSL #4] 熟練Oh-My-Zsh基本操作，快速變身為鍵盤高手" target="_blank" data-wpel-link="internal">[WSL #4] 熟練Oh-My-Zsh基本操作，快速變身為鍵盤高手</a>  (0則留言, 2020/02/21)</li>
<li><a href="https://jdev.tw/blog/8253/stable-diffusion-oldsix-prompt-extension" rel="bookmark" title="SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學" target="_blank" data-wpel-link="internal">SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學</a>  (0則留言, 2023/11/11)</li>
<li><a href="https://jdev.tw/blog/4555/windows-10-shortcuts-hotkeys" rel="bookmark" title="幾個方便的Windows 10快捷鍵" target="_blank" data-wpel-link="internal">幾個方便的Windows 10快捷鍵</a>  (0則留言, 2015/08/09)</li>
<li><a href="https://jdev.tw/blog/8385/obsidian-copilot-local-llms-ollama2-lm-studio" rel="bookmark" title="Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio" target="_blank" data-wpel-link="internal">Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio</a>  (0則留言, 2024/03/17)</li>
<li><a href="https://jdev.tw/blog/6600/obsidian-outliner-plugin" rel="bookmark" title="[Obs＃29] Outliner plugin：智慧列表再進化" target="_blank" data-wpel-link="internal">[Obs＃29] Outliner plugin：智慧列表再進化</a>  (0則留言, 2021/03/27)</li>
<li><a href="https://jdev.tw/blog/8245/stabilitymatrix-models-webui-operations" rel="bookmark" title="SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作" target="_blank" data-wpel-link="internal">SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作</a>  (2則留言, 2023/10/29)</li>
<li><a href="https://jdev.tw/blog/8797/filmora-keyboard-shortcuts" rel="bookmark" title="Fimora實務06｜高效剪輯：Fimora快捷鍵自訂秘訣" target="_blank" data-wpel-link="internal">Fimora實務06｜高效剪輯：Fimora快捷鍵自訂秘訣</a>  (0則留言, 2025/04/26)</li>
<li><a href="https://jdev.tw/blog/8239/stabilitymatrix-install-stable-diffusikon-quicklyh" rel="bookmark" title="SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具" target="_blank" data-wpel-link="internal">SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具</a>  (2則留言, 2023/10/22)</li>
<li><a href="https://jdev.tw/blog/7645/obsidian-tab-shortcuts%e5%bd%99%e7%b8%bd" rel="bookmark" title="Obsidian Tab Shortcuts彙總" target="_blank" data-wpel-link="internal">Obsidian Tab Shortcuts彙總</a>  (0則留言, 2022/08/31)</li>
</ul>
<p><!-- Similar Posts took 49.397 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AI 爆發時代的產品命名學</title>
		<link>https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study</link>
					<comments>https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Thu, 02 Apr 2026 02:50:17 +0000</pubDate>
				<category><![CDATA[AI-Agent(OpenCode)]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[opencode]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9196</guid>

					<description><![CDATA[在這個 AI 大爆發時代裡，各類 AI 產品如雨後春筍般層出不窮。以下列舉幾個或許有特殊含義的產品名稱。 1. Anthropic 「文學作品集」 使用率超過 OpenAI、異軍突起的 Ahthrop&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9196" class="pvc_stats all  " data-element-id="9196" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>在這個 AI 大爆發時代裡，各類 AI 產品如雨後春筍般層出不窮。以下列舉幾個或許有特殊含義的產品名稱。</p>
<p><span id="more-9196"></span></p>
<h2>1. Anthropic 「文學作品集」</h2>
<p>使用率超過 OpenAI、異軍突起的 Ahthropic 公司的命名獨樹一幟：</p>
<ul>
<li><strong>Anthropic [ æn'θrɑpɪk]</strong>: 人類的、人類中心的</li>
<li>Anthropic 旗下大語言模式 <strong>Opus [ˈopəs]</strong>: 源自拉丁文，意思是「作品」或「創作」。在音樂、藝術與文學領域中，常用來指某位作曲家或藝術家的作品，尤其在古典音樂裡會用編號標示，如「Op. 1」代表第一號作品。</li>
<li>Anthropic 旗下大語言模式 <strong>Sonnet [ˈsɒnɪt]</strong>: 意思是「十四行詩」，一種源自義大利的定型詩體，通常由 14 行組成並遵循嚴格的押韻與節奏規則。</li>
<li>Anthropic 旗下大語言模式 <strong>Haiku [ˈhīˌko͞o]</strong>: 俳句，是一種源自日本的定型短詩</li>
</ul>
<h2>2. Oh My Openagent 希臘神祇</h2>
<p>原名 Oh-My-Opencode，是 AI Agent OpenCode 的外掛，它的各個代理名稱也很特殊，大都來自希臘神話：</p>
<ul>
<li>
<p><strong>Sisyphus [ˈsisəfəs]</strong> (永不眠的 CTO): 薛西弗斯/西西佛斯<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1775096341000aduwue.png" alt="gh|285" /></p>
</li>
<li>
<p><strong>Prometheus [prəˈmiː.θi.əs]</strong> (Strategic Planner): 普羅米修斯，因贈予人類火種和知識被宙斯懲罰<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1775096522000p8hypg.png" alt="gh|285" /></p>
</li>
<li>
<p><strong>Atlas ['ætləs]</strong> (Master Executor): 阿特拉斯，希臘神話中泰坦神族（Titans）的擎天巨神，因在「泰坦戰爭」中協助克洛諾斯對抗宙斯，戰敗後被宙斯懲罰，永久在世界最西端用雙肩支撐蒼天，防止天地相擁。大西洋（Atlantis/Atlantic）皆源自其名。<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1775096953000w7xqkr.png" alt="gh|285" /></p>
</li>
<li>
<p><strong>Hephaestus [hi'festəs]</strong>(深度工作者): 赫菲斯托斯，火神、鍛造與砌石之神、雕刻藝術之神<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1775097168000i8rjox.png" alt="gh|285" /></p>
</li>
<li>
<p><strong>Metis [meɪˈtiː]</strong>(Plan Consultant): 墨提斯，最初她是機智和計謀的女神，後來代表更廣的智慧和沉思，是智慧女神和女戰神雅典娜的母親。<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1775097585000ymg26o.png" alt="gh|285" /></p>
</li>
<li>
<p><strong>Momus [ˈmoʊməs]</strong>(Plan Reviewer): 摩墨斯，非難指責和嘲弄之神。<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/17750978520004nezsh.png" alt="gh|285" /></p>
</li>
</ul>
<h2>3. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://ohmyopenagent.com/zh" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Oh My OpenAgent — The Best Agent Harness | Oh My OpenAgent<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4" rel="bookmark" title="以OpenCode連接GPT模型時發生錯誤" target="_blank" data-wpel-link="internal">以OpenCode連接GPT模型時發生錯誤</a>  (0則留言, 2026/03/26)</li>
<li><a href="https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server" rel="bookmark" title="透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server" target="_blank" data-wpel-link="internal">透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" rel="bookmark" title="OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】" target="_blank" data-wpel-link="internal">OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】</a>  (0則留言, 2026/05/02)</li>
<li><a href="https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode" rel="bookmark" title="如何在OpenCode裡使用更多的免費大語言模型？" target="_blank" data-wpel-link="internal">如何在OpenCode裡使用更多的免費大語言模型？</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" rel="bookmark" title="90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類" target="_blank" data-wpel-link="internal">90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類</a>  (0則留言, 2026/04/25)</li>
<li><a href="https://jdev.tw/blog/8385/obsidian-copilot-local-llms-ollama2-lm-studio" rel="bookmark" title="Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio" target="_blank" data-wpel-link="internal">Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio</a>  (0則留言, 2024/03/17)</li>
<li><a href="https://jdev.tw/blog/8253/stable-diffusion-oldsix-prompt-extension" rel="bookmark" title="SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學" target="_blank" data-wpel-link="internal">SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學</a>  (0則留言, 2023/11/11)</li>
<li><a href="https://jdev.tw/blog/8245/stabilitymatrix-models-webui-operations" rel="bookmark" title="SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作" target="_blank" data-wpel-link="internal">SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作</a>  (2則留言, 2023/10/29)</li>
<li><a href="https://jdev.tw/blog/8239/stabilitymatrix-install-stable-diffusikon-quicklyh" rel="bookmark" title="SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具" target="_blank" data-wpel-link="internal">SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具</a>  (2則留言, 2023/10/22)</li>
<li><a href="https://jdev.tw/blog/8371/obsidian-windows-batch-autohotkey-syntax-highlight" rel="bookmark" title="Obsidian Windows批次檔與AutoHotkey 語法高亮的用法" target="_blank" data-wpel-link="internal">Obsidian Windows批次檔與AutoHotkey 語法高亮的用法</a>  (2則留言, 2024/03/10)</li>
<li><a href="https://jdev.tw/blog/6728/nushell-new-type-shell-written-in-rust" rel="bookmark" title="Nushell：新時代的新型態Shell" target="_blank" data-wpel-link="internal">Nushell：新時代的新型態Shell</a>  (0則留言, 2021/06/26)</li>
<li><a href="https://jdev.tw/blog/5370/sql-server-outer-apply-exsample" rel="bookmark" title="SQL Server的outer apply使用範例" target="_blank" data-wpel-link="internal">SQL Server的outer apply使用範例</a>  (0則留言, 2018/06/09)</li>
<li><a href="https://jdev.tw/blog/1274/wordpress-wptouch-iphone-htc-touch-hd" rel="bookmark" title="用WordPress的WPtouch外掛顯示iPhone與HTC Touch HD的精簡樣式[修訂]" target="_blank" data-wpel-link="internal">用WordPress的WPtouch外掛顯示iPhone與HTC Touch HD的精簡樣式[修訂]</a>  (0則留言, 2009/02/02)</li>
<li><a href="https://jdev.tw/blog/7679/git-enter-passphrase-issue" rel="bookmark" title="執行git指令時一直要求輸入passphrase&#8230;" target="_blank" data-wpel-link="internal">執行git指令時一直要求輸入passphrase&#8230;</a>  (0則留言, 2022/09/14)</li>
<li><a href="https://jdev.tw/blog/8748/quaily-cross-channel-publishing-ai-translation-expand-multilingual-content" rel="bookmark" title="內容平台 quaily.com 的跨頻道發佈：AI 翻譯助力，輕鬆拓展多語內容" target="_blank" data-wpel-link="internal">內容平台 quaily.com 的跨頻道發佈：AI 翻譯助力，輕鬆拓展多語內容</a>  (0則留言, 2025/04/08)</li>
</ul>
<p><!-- Similar Posts took 19.949 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>以OpenCode連接GPT模型時發生錯誤</title>
		<link>https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4</link>
					<comments>https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Thu, 26 Mar 2026 05:17:09 +0000</pubDate>
				<category><![CDATA[AI-Agent(OpenCode)]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[opencode]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9193</guid>

					<description><![CDATA[今天以OpenCode Zen使用GPT 5.4和GPT 5.3-Codex產生AGENTS.md時，OpenCode建立了數個Subagents，結果畫面彈出多個 Todo 未完成，且可看到 Pro&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9193" class="pvc_stats all  " data-element-id="9193" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>今天以OpenCode Zen使用GPT 5.4和GPT 5.3-Codex產生AGENTS.md時，OpenCode建立了數個Subagents，結果畫面彈出多個 Todo 未完成，且可看到 Provider not found 之類的文字，最終按了<kbd>Ctrl+C</kbd>關閉視窗。</p>
<p><span id="more-9193"></span></p>
<p>查看OpenCode的GitHub issues後，發現有類似的狀況：<a href="https://github.com/anomalyco/opencode/issues/14633" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Agent loses context of AGENTS.MD rules when invoking parallel Task tool for batch processing · Issue #14633 · anomalyco/opencode<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>遇到這個狀況，換一個模型試試。後來換了 GLM5 就沒有錯誤了。</p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode" rel="bookmark" title="如何在OpenCode裡使用更多的免費大語言模型？" target="_blank" data-wpel-link="internal">如何在OpenCode裡使用更多的免費大語言模型？</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" rel="bookmark" title="OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】" target="_blank" data-wpel-link="internal">OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】</a>  (0則留言, 2026/05/02)</li>
<li><a href="https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" rel="bookmark" title="90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類" target="_blank" data-wpel-link="internal">90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類</a>  (0則留言, 2026/04/25)</li>
<li><a href="https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study" rel="bookmark" title="AI 爆發時代的產品命名學" target="_blank" data-wpel-link="internal">AI 爆發時代的產品命名學</a>  (0則留言, 2026/04/02)</li>
<li><a href="https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server" rel="bookmark" title="透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server" target="_blank" data-wpel-link="internal">透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/8245/stabilitymatrix-models-webui-operations" rel="bookmark" title="SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作" target="_blank" data-wpel-link="internal">SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作</a>  (2則留言, 2023/10/29)</li>
<li><a href="https://jdev.tw/blog/8385/obsidian-copilot-local-llms-ollama2-lm-studio" rel="bookmark" title="Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio" target="_blank" data-wpel-link="internal">Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio</a>  (0則留言, 2024/03/17)</li>
<li><a href="https://jdev.tw/blog/8239/stabilitymatrix-install-stable-diffusikon-quicklyh" rel="bookmark" title="SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具" target="_blank" data-wpel-link="internal">SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具</a>  (2則留言, 2023/10/22)</li>
<li><a href="https://jdev.tw/blog/8253/stable-diffusion-oldsix-prompt-extension" rel="bookmark" title="SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學" target="_blank" data-wpel-link="internal">SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學</a>  (0則留言, 2023/11/11)</li>
<li><a href="https://jdev.tw/blog/5744/autohotkey-close-all-by-title" rel="bookmark" title="由零開始寫一次關閉多個同名程式的 AutoHotkey腳本（AHK #10）" target="_blank" data-wpel-link="internal">由零開始寫一次關閉多個同名程式的 AutoHotkey腳本（AHK #10）</a>  (0則留言, 2019/07/14)</li>
<li><a href="https://jdev.tw/blog/5440/windows-quickkill" rel="bookmark" title="[Windows] 快速終止應用程式視窗的工具：QuickKill" target="_blank" data-wpel-link="internal">[Windows] 快速終止應用程式視窗的工具：QuickKill</a>  (0則留言, 2018/09/14)</li>
<li><a href="https://jdev.tw/blog/7645/obsidian-tab-shortcuts%e5%bd%99%e7%b8%bd" rel="bookmark" title="Obsidian Tab Shortcuts彙總" target="_blank" data-wpel-link="internal">Obsidian Tab Shortcuts彙總</a>  (0則留言, 2022/08/31)</li>
<li><a href="https://jdev.tw/blog/7679/git-enter-passphrase-issue" rel="bookmark" title="執行git指令時一直要求輸入passphrase&#8230;" target="_blank" data-wpel-link="internal">執行git指令時一直要求輸入passphrase&#8230;</a>  (0則留言, 2022/09/14)</li>
<li><a href="https://jdev.tw/blog/412/autohotkey-escape-twice" rel="bookmark" title="[AutoHotkey] 連按兩次Escape鍵來關閉視窗" target="_blank" data-wpel-link="internal">[AutoHotkey] 連按兩次Escape鍵來關閉視窗</a>  (27則留言, 2006/05/11)</li>
<li><a href="https://jdev.tw/blog/1686/closeall-windows-autohotkey" rel="bookmark" title="關閉所有視窗的小工具：CloseAll.exe" target="_blank" data-wpel-link="internal">關閉所有視窗的小工具：CloseAll.exe</a>  (2則留言, 2010/05/22)</li>
</ul>
<p><!-- Similar Posts took 8.159 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>如何在OpenCode裡使用更多的免費大語言模型？</title>
		<link>https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode</link>
					<comments>https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Fri, 20 Mar 2026 03:16:09 +0000</pubDate>
				<category><![CDATA[AI-Agent(OpenCode)]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[LLM]]></category>
		<category><![CDATA[opencode]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9190</guid>

					<description><![CDATA[目前(2026/03/20) OpenCode Zen能使用下列 5 種免費模型： MiniMax M2.5 Free Big Pickle Mimo V2 Pro Free Mimo V2 Omni&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9190" class="pvc_stats all  " data-element-id="9190" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>目前(2026/03/20) OpenCode Zen能使用下列 5 種免費模型：</p>
<ul>
<li>MiniMax M2.5 Free</li>
<li>Big Pickle</li>
<li>Mimo V2 Pro Free</li>
<li>Mimo V2 Omni Free</li>
<li>Nemotron 3 Super Free</li>
</ul>
<p><span id="more-9190"></span></p>
<p>有沒有辦法能使用更多的免費模型呢？發現了一個方法：由<a href="https://build.nvidia.com/models?filters=nimType%3Anim_type_preview" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">build.nvidia.com<span class="wpel-icon wpel-image wpel-icon-6"></span></a>取得API Key就能使用 94 種模型了。</p>
<p><img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1773976004000gysyd5.png" alt="gh|900" /></p>
<blockquote>
<p>[!warning] 注意！<br />
免費模型可能會擷取你的Requests做訓練，請小心選用模型。</p>
</blockquote>
<h2>1. 使用步驟</h2>
<ol>
<li>到 <a href="https://build.nvidia,com" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">https://build.nvidia,com<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 註冊，再取得 API Key</li>
<li>啟動 OpenCode 後輸入 <code>/connect</code>，選用 NVidia</li>
<li>貼入 API Key</li>
<li>輸入 <code>/models</code> 即可選用要使用的模型了</li>
</ol>
<h2>2. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /><a href="https://build.nvidia.com/models?filters=nimType%3Anim_type_preview" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">build NVIDIA<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 解說文章(繁體中文):<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/how-to-use-more-free-large-language-models-in-opencode" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/how-to-use-more-free-large-language-models-in-opencode" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4" rel="bookmark" title="以OpenCode連接GPT模型時發生錯誤" target="_blank" data-wpel-link="internal">以OpenCode連接GPT模型時發生錯誤</a>  (0則留言, 2026/03/26)</li>
<li><a href="https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" rel="bookmark" title="OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】" target="_blank" data-wpel-link="internal">OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】</a>  (0則留言, 2026/05/02)</li>
<li><a href="https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server" rel="bookmark" title="透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server" target="_blank" data-wpel-link="internal">透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" rel="bookmark" title="90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類" target="_blank" data-wpel-link="internal">90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類</a>  (0則留言, 2026/04/25)</li>
<li><a href="https://jdev.tw/blog/8245/stabilitymatrix-models-webui-operations" rel="bookmark" title="SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作" target="_blank" data-wpel-link="internal">SD002｜用StabilityMatrix安裝新模型；模型種類說明與WebUI基本操作</a>  (2則留言, 2023/10/29)</li>
<li><a href="https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study" rel="bookmark" title="AI 爆發時代的產品命名學" target="_blank" data-wpel-link="internal">AI 爆發時代的產品命名學</a>  (0則留言, 2026/04/02)</li>
<li><a href="https://jdev.tw/blog/8239/stabilitymatrix-install-stable-diffusikon-quicklyh" rel="bookmark" title="SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具" target="_blank" data-wpel-link="internal">SD001｜用StabilityMatrix一鍵安裝Stable Diffusion－免費的AI圖像生成工具</a>  (2則留言, 2023/10/22)</li>
<li><a href="https://jdev.tw/blog/8385/obsidian-copilot-local-llms-ollama2-lm-studio" rel="bookmark" title="Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio" target="_blank" data-wpel-link="internal">Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio</a>  (0則留言, 2024/03/17)</li>
<li><a href="https://jdev.tw/blog/8957/datagrip-free-use" rel="bookmark" title="JetBrains公司的DataGrip可以非商用免費使用了" target="_blank" data-wpel-link="internal">JetBrains公司的DataGrip可以非商用免費使用了</a>  (0則留言, 2025/10/07)</li>
<li><a href="https://jdev.tw/blog/8253/stable-diffusion-oldsix-prompt-extension" rel="bookmark" title="SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學" target="_blank" data-wpel-link="internal">SD003｜懶人提示詞產生器 OldSix Stable Diffusion 擴充完整操作教學</a>  (0則留言, 2023/11/11)</li>
<li><a href="https://jdev.tw/blog/8901/first-try-zed-for-windows-unofficial-builds" rel="bookmark" title="初試 Zed for Windows (Unofficial builds)" target="_blank" data-wpel-link="internal">初試 Zed for Windows (Unofficial builds)</a>  (0則留言, 2025/08/28)</li>
<li><a href="https://jdev.tw/blog/9025/whisperdesktop-alternatives-whisper-cpp-guide-rust-gui-introduction" rel="bookmark" title="WhisperDesktop替代方案：Whisper.cpp上手指南與Rust GUI介紹" target="_blank" data-wpel-link="internal">WhisperDesktop替代方案：Whisper.cpp上手指南與Rust GUI介紹</a>  (0則留言, 2025/11/11)</li>
<li><a href="https://jdev.tw/blog/241/free-download-manager" rel="bookmark" title="[Tools] 真正免費的Free Download Manager" target="_blank" data-wpel-link="internal">[Tools] 真正免費的Free Download Manager</a>  (3則留言, 2005/06/13)</li>
<li><a href="https://jdev.tw/blog/5890/flutter-statelesswidget-abd-statefulwidget-and-more" rel="bookmark" title="03. 更多的Flutter範例：StatelessWidget、StatefulWidgett與其他Widgets" target="_blank" data-wpel-link="internal">03. 更多的Flutter範例：StatelessWidget、StatefulWidgett與其他Widgets</a>  (0則留言, 2019/09/21)</li>
<li><a href="https://jdev.tw/blog/8646/obsidian-free-for-work" rel="bookmark" title="Obsidian：可在企業內免費使用了！&#x1f389;" target="_blank" data-wpel-link="internal">Obsidian：可在企業內免費使用了！<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f389.png" alt="🎉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a>  (0則留言, 2025/02/21)</li>
</ul>
<p><!-- Similar Posts took 8.098 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server</title>
		<link>https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server</link>
					<comments>https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Fri, 20 Mar 2026 02:35:58 +0000</pubDate>
				<category><![CDATA[AI-Agent(OpenCode)]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[gitea]]></category>
		<category><![CDATA[opencode]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9185</guid>

					<description><![CDATA[安裝了本地的Gitea MCP Server後，就可以在 OpenCode 裡以自然語言查詢Gitea Server的諸多資訊了，不用一個一個網頁的查看，或使用SQL查詢。 「享受透過聊天探索與管理您&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9185" class="pvc_stats all  " data-element-id="9185" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>安裝了本地的Gitea MCP Server後，就可以在 OpenCode 裡以<strong>自然語言</strong>查詢Gitea Server的諸多資訊了，不用一個一個網頁的查看，或使用SQL查詢。</p>
<p><span id="more-9185"></span></p>
<blockquote>
<p>「享受透過聊天探索與管理您的 Gitea 倉庫！」</p>
</blockquote>
<p><img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1773974101000g0wow3.png" alt="gh|900" /></p>
<h2>1. 安裝步驟</h2>
<ol>
<li>下載 gitea-mcp.exe: <a href="https://gitea.com/gitea/gitea-mcp/releases" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">https://gitea.com/gitea/gitea-mcp/releases<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li>
<li>拷貝 gitea-mcp.exe 到環境變數 PATH 能搜尋到的資料夾</li>
<li>編輯 <code>C:\Users\使用者帳號\.config\opencode\opencode.json</code>，添加 &quot;gitea-mcp&quot; 這段
<ol>
<li>Personal Access Token(PAT): 設定→應用程式→Token</li>
<li>Token只有在剛產生出時可以複製，可使用以前複製起來的或[[300-R興趣/300-99-Tools/ai/透過聊天探索與管理您的 Gitea 倉庫─使用Gitea MCP Server#如何用OpenCode查詢公司的Gitea server？#建立新的PAT|建立新的PAT]]</li>
</ol>
</li>
</ol>
<pre><code class="language-json">{
  &quot;$schema&quot;: &quot;https://opencode.ai/config.json&quot;,
  &quot;plugin&quot;: [
    &quot;oh-my-opencode&quot;
  ],
  &quot;permission&quot;: {
    &quot;skill&quot;: {
      &quot;*&quot;: &quot;allow&quot;,
      &quot;pr-review&quot;: &quot;allow&quot;,
      &quot;internal-*&quot;: &quot;deny&quot;,
      &quot;experimental-*&quot;: &quot;ask&quot;
    }
  },
  &quot;mcp&quot;: {
    &quot;GitHub-MCP&quot;: {
      &quot;type&quot;: &quot;remote&quot;,
      &quot;url&quot;: &quot;https://api.githubcopilot.com/mcp/&quot;,
      &quot;enabled&quot;: true,
      &quot;headers&quot;: {
        &quot;Authorization&quot;: &quot;Bearer GitHub的Personal Access Token&quot;
      }
    },
    &quot;chrome-devtools&quot;: {
      &quot;type&quot;: &quot;local&quot;,
      &quot;command&quot;: [
        &quot;npx&quot;,
        &quot;chrome-devtools-mcp@latest&quot;,
        &quot;--autoConnect&quot;
      ]
    },
    &quot;gitea-mcp&quot;: {
      &quot;type&quot;: &quot;local&quot;,
      &quot;command&quot;: [
        &quot;gitea-mcp&quot;,
        &quot;-t&quot;,
        &quot;stdio&quot;,
        &quot;--host&quot;,
        &quot;https://你的Gitea server網址&quot;,
        &quot;--token&quot;, &quot;你的Personal Access Token&quot;
      ]
    }
  }
}</code></pre>
<h2>2. 使用範例</h2>
<pre><code>全部有多少 repos?</code></pre>
<pre><code>列出組織有的repos 數, Top 10</code></pre>
<pre><code>組織 MY_ORG 有那些repos?</code></pre>
<h2>3. 建立新的PAT</h2>
<ul>
<li>啟用更多的讀取權限<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/1773911686000368wsq.png" alt="gh|600" /></li>
</ul>
<h2>相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://jdev.tw/blog/9185/" target="_blank" data-wpel-link="internal">解說文章(繁體中文)</a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/explore-manage-gitea-repo-using-gitea-mcp-server" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/explore-manage-gitea-repo-using-gitea-mcp-server" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9190/how-to-use-more-free-large-language-models-in-opencode" rel="bookmark" title="如何在OpenCode裡使用更多的免費大語言模型？" target="_blank" data-wpel-link="internal">如何在OpenCode裡使用更多的免費大語言模型？</a>  (0則留言, 2026/03/20)</li>
<li><a href="https://jdev.tw/blog/9193/%e4%bb%a5opencode%e9%80%a3%e6%8e%a5gpt%e6%a8%a1%e5%9e%8b%e6%99%82%e7%99%bc%e7%94%9f%e9%8c%af%e8%aa%a4" rel="bookmark" title="以OpenCode連接GPT模型時發生錯誤" target="_blank" data-wpel-link="internal">以OpenCode連接GPT模型時發生錯誤</a>  (0則留言, 2026/03/26)</li>
<li><a href="https://jdev.tw/blog/9207/opencode-tui-common-commands-slash-commands-system-commands-learning-once-opencode-002" rel="bookmark" title="OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】" target="_blank" data-wpel-link="internal">OpenCode TUI 常用命令行選項與斜線命令─系統指令一次學會 【OpenCode 002】</a>  (0則留言, 2026/05/02)</li>
<li><a href="https://jdev.tw/blog/8551/gitea-server-permission-denied-publickey" rel="bookmark" title="解決Gitea Server 的 Permission denied (publickey) 錯誤的步驟" target="_blank" data-wpel-link="internal">解決Gitea Server 的 Permission denied (publickey) 錯誤的步驟</a>  (0則留言, 2024/10/17)</li>
<li><a href="https://jdev.tw/blog/7652/gitea-build-lets-encrypt-ssl-steps" rel="bookmark" title="幫Gitea網站使用Let&#8217;s Encrypt SSL憑證的設定步驟" target="_blank" data-wpel-link="internal">幫Gitea網站使用Let&#8217;s Encrypt SSL憑證的設定步驟</a>  (0則留言, 2022/09/01)</li>
<li><a href="https://jdev.tw/blog/9201/open-code-hidden-shortcuts-input-efficiency-guide-ui-layout-key-complete-classification" rel="bookmark" title="90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類" target="_blank" data-wpel-link="internal">90% 的人不知道的 OpenCode 隱藏快捷鍵─OpenCode TUI 輸入效率全攻略，UI佈局＋按鍵完整分類</a>  (0則留言, 2026/04/25)</li>
<li><a href="https://jdev.tw/blog/5246/gitea-server-ssh-settings" rel="bookmark" title="啟用Gitea Server的SSH服務，可大幅增加連線速度" target="_blank" data-wpel-link="internal">啟用Gitea Server的SSH服務，可大幅增加連線速度</a>  (0則留言, 2018/02/15)</li>
<li><a href="https://jdev.tw/blog/8292/delete-gitea-sqlite3-action" rel="bookmark" title="定時刪除Gitea的SQLite3資料" target="_blank" data-wpel-link="internal">定時刪除Gitea的SQLite3資料</a>  (0則留言, 2024/01/01)</li>
<li><a href="https://jdev.tw/blog/9196/ai-explosion-era-product-naming-study" rel="bookmark" title="AI 爆發時代的產品命名學" target="_blank" data-wpel-link="internal">AI 爆發時代的產品命名學</a>  (0則留言, 2026/04/02)</li>
<li><a href="https://jdev.tw/blog/7671/git-https-ssl-fail-solutions" rel="bookmark" title="Git https/SSL 連線失敗時的解決方法" target="_blank" data-wpel-link="internal">Git https/SSL 連線失敗時的解決方法</a>  (0則留言, 2022/09/06)</li>
<li><a href="https://jdev.tw/blog/7655/gitea-customize-pages" rel="bookmark" title="Gitea網頁添加自訂選項以開啟說明文件" target="_blank" data-wpel-link="internal">Gitea網頁添加自訂選項以開啟說明文件</a>  (0則留言, 2022/09/01)</li>
<li><a href="https://jdev.tw/blog/7125/gitea-install-and-setup" rel="bookmark" title="[Git＃9] Gitea 安裝與設定：輕量級程式碼託管解決方案" target="_blank" data-wpel-link="internal">[Git＃9] Gitea 安裝與設定：輕量級程式碼託管解決方案</a>  (0則留言, 2022/05/22)</li>
<li><a href="https://jdev.tw/blog/5089/windows-git-server-gitea" rel="bookmark" title="[Windows] 用Gitea架設自用的Git Server" target="_blank" data-wpel-link="internal">[Windows] 用Gitea架設自用的Git Server</a>  (2則留言, 2017/07/21)</li>
<li><a href="https://jdev.tw/blog/8385/obsidian-copilot-local-llms-ollama2-lm-studio" rel="bookmark" title="Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio" target="_blank" data-wpel-link="internal">Obs157｜用Copilot外掛使用本地AI模型服務－使用Ollama與LM Studio</a>  (0則留言, 2024/03/17)</li>
<li><a href="https://jdev.tw/blog/8805/gql-git-query-language-command-line" rel="bookmark" title="Git Query Language：用SQL語法探索Git儲存庫的命令行利器" target="_blank" data-wpel-link="internal">Git Query Language：用SQL語法探索Git儲存庫的命令行利器</a>  (0則留言, 2025/05/11)</li>
</ul>
<p><!-- Similar Posts took 12.873 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9185/explore-manage-gitea-repo-using-gitea-mcp-server/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>變更Windows系統字體大小的免費工具：No!! Meiryo UI</title>
		<link>https://jdev.tw/blog/9180/change-windows-system-font-size-free-tool-no-meiryo-ui</link>
					<comments>https://jdev.tw/blog/9180/change-windows-system-font-size-free-tool-no-meiryo-ui#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Tue, 24 Feb 2026 01:53:58 +0000</pubDate>
				<category><![CDATA[系統、調校]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9180</guid>

					<description><![CDATA[當我的筆電連接外部大尺寸螢幕時，Windows的系統字體通常會過小，長時間使用很容易讓眼睛不舒服。後來使用了Alternate Font Sizer變更功能表字體、訊息框字體等，但這個軟體在設定並套用&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9180" class="pvc_stats all  " data-element-id="9180" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>當我的筆電連接外部大尺寸螢幕時，Windows的系統字體通常會過小，長時間使用很容易讓眼睛不舒服。後來使用了<a href="https://www.alternate-tools.com/pages/c_fontsizer.php" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Alternate Font Sizer<span class="wpel-icon wpel-image wpel-icon-6"></span></a>變更功能表字體、訊息框字體等，但這個軟體在設定並套用後，必須重新登入Windows才能讓新設定生效，操作有點煩人。</p>
<p><span id="more-9180"></span></p>
<p>最近發現來自日本的<a href="https://github.com/Tatsu-syo/noMeiryoUI" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">No!! Meiryo UI<span class="wpel-icon wpel-image wpel-icon-6"></span></a>，設定後直接生效，非常方便。</p>
<p><img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2026/17718975130008smmw3.png" alt="gh|900" /></p>
<p>「這個工具的目的就是讓使用者能快速替換掉 Windows 8 之後系統介面大量使用的 Meiryo UI 字型，因為不少人覺得它在螢幕顯示上不夠美觀或不適合長時間閱讀。」</p>
<p>日文Windows 11預設字體是 Yu Gothic，繁體中文是微軟正黑體，簡體中文是微軟雅黑體。</p>
<h2>1. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 解說文章(繁體中文): <a href="https://jdev.tw/blog/9180/" target="_blank" data-wpel-link="internal">https://jdev.tw/blog/9180/</a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/change-windows-system-font-size-free-tool-no-meiryo-ui" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/change-windows-system-font-size-free-tool-no-meiryo-ui" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />No!! Meiryo UI GitHub: <a href="https://github.com/Tatsu-syo/noMeiryoUI" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">https://github.com/Tatsu-syo/noMeiryoUI<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/396/%e5%be%ae%e8%bb%9f%e6%96%b0%e5%ad%97%e9%ab%94%ef%bc%9a%e6%ad%a3%e9%bb%91%e9%ab%94" rel="bookmark" title="微軟新字體：正黑體" target="_blank" data-wpel-link="internal">微軟新字體：正黑體</a>  (0則留言, 2006/04/29)</li>
<li><a href="https://jdev.tw/blog/6277/gsudo-windows-terminal" rel="bookmark" title="以系統管理員啟動Windows Terminal的簡單方法：使用gsudo.exe" target="_blank" data-wpel-link="internal">以系統管理員啟動Windows Terminal的簡單方法：使用gsudo.exe</a>  (0則留言, 2020/05/20)</li>
<li><a href="https://jdev.tw/blog/6383/windows-10-ms-settings-uri" rel="bookmark" title="Windows 10快速系統設定的小技巧" target="_blank" data-wpel-link="internal">Windows 10快速系統設定的小技巧</a>  (0則留言, 2020/08/12)</li>
<li><a href="https://jdev.tw/blog/260/site-windows%e6%ad%b7%e5%b9%b4%e4%be%86%e7%9a%84%e7%b3%bb%e7%b5%b1%e7%95%ab%e9%9d%a2" rel="bookmark" title="[Site] Windows歷年來的系統畫面" target="_blank" data-wpel-link="internal">[Site] Windows歷年來的系統畫面</a>  (1則留言, 2005/07/04)</li>
<li><a href="https://jdev.tw/blog/4784/windows-updates-disabler" rel="bookmark" title="最簡單的啟動/關閉Windows Updates的工具；Windows 10也適用" target="_blank" data-wpel-link="internal">最簡單的啟動/關閉Windows Updates的工具；Windows 10也適用</a>  (0則留言, 2016/03/28)</li>
<li><a href="https://jdev.tw/blog/2522/3-windows7-taskbar-tools" rel="bookmark" title="3個改造Windows 7工作列的免費工具" target="_blank" data-wpel-link="internal">3個改造Windows 7工作列的免費工具</a>  (1則留言, 2011/09/19)</li>
<li><a href="https://jdev.tw/blog/6855/crow-translate-for-windows-and-linux" rel="bookmark" title="跨平台的免費即時翻譯工具：Crow Translat，有語音與OCR功能" target="_blank" data-wpel-link="internal">跨平台的免費即時翻譯工具：Crow Translat，有語音與OCR功能</a>  (0則留言, 2021/10/02)</li>
<li><a href="https://jdev.tw/blog/6962/beeftext-text-expander" rel="bookmark" title="BeefText：超級簡單的熱字串/縮寫擴展工具" target="_blank" data-wpel-link="internal">BeefText：超級簡單的熱字串/縮寫擴展工具</a>  (0則留言, 2022/01/01)</li>
<li><a href="https://jdev.tw/blog/710/startup-delayer-speed-up-boo" rel="bookmark" title="用Startup Delayer加速Windows的開機速度" target="_blank" data-wpel-link="internal">用Startup Delayer加速Windows的開機速度</a>  (2則留言, 2008/02/14)</li>
<li><a href="https://jdev.tw/blog/3345/windows-build-number-secret" rel="bookmark" title="Windows作業系統組建編號（Build Number）的奧秘" target="_blank" data-wpel-link="internal">Windows作業系統組建編號（Build Number）的奧秘</a>  (0則留言, 2013/03/18)</li>
<li><a href="https://jdev.tw/blog/7857/cmd-exe-mono-font" rel="bookmark" title="變更命令提示字元cmd exe的字型，更清楚、更美觀" target="_blank" data-wpel-link="internal">變更命令提示字元cmd exe的字型，更清楚、更美觀</a>  (0則留言, 2022/11/23)</li>
<li><a href="https://jdev.tw/blog/6098/windows-terminal-runas-administrator" rel="bookmark" title="以系統管理員啟動Windows Terminal的３個方法" target="_blank" data-wpel-link="internal">以系統管理員啟動Windows Terminal的３個方法</a>  (0則留言, 2020/01/24)</li>
<li><a href="https://jdev.tw/blog/6292/windows-terminal-themes-website" rel="bookmark" title="Windows Terminal佈景主題配色超輕鬆！" target="_blank" data-wpel-link="internal">Windows Terminal佈景主題配色超輕鬆！</a>  (0則留言, 2020/05/30)</li>
<li><a href="https://jdev.tw/blog/4080/dir-al-reparse-points" rel="bookmark" title="[Windows] 以dir /AL列出磁碟裡的符號連結資料夾或檔案" target="_blank" data-wpel-link="internal">[Windows] 以dir /AL列出磁碟裡的符號連結資料夾或檔案</a>  (0則留言, 2014/06/30)</li>
<li><a href="https://jdev.tw/blog/8975/solved-nyagos-two-needs" rel="bookmark" title="[Windows] 解決了Nyagos的兩個需求" target="_blank" data-wpel-link="internal">[Windows] 解決了Nyagos的兩個需求</a>  (0則留言, 2025/10/17)</li>
</ul>
<p><!-- Similar Posts took 12.632 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9180/change-windows-system-font-size-free-tool-no-meiryo-ui/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在Nyagos裡以Lua撰寫當前資料夾檔案選單，以快速取回檔名</title>
		<link>https://jdev.tw/blog/9169/lua-file-menu-nyagos</link>
					<comments>https://jdev.tw/blog/9169/lua-file-menu-nyagos#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Fri, 12 Dec 2025 08:36:03 +0000</pubDate>
				<category><![CDATA[Windows學習誌]]></category>
		<category><![CDATA[系統、調校]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[nyagos]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9169</guid>

					<description><![CDATA[上一篇在Nyagos裡以Lua撰寫模擬cmd.exe F1~F9的功能改寫了 F9 功能鍵，讓它回傳當前資料夾裡最新的檔名。這個功能通常使用在瀏覽器下載了某個檔案後，在命令行立即找回下載檔名，以省略做&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9169" class="pvc_stats all  " data-element-id="9169" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>上一篇<a href="https://jdev.tw/blog/9150/" target="_blank" data-wpel-link="internal">在Nyagos裡以Lua撰寫模擬cmd.exe F1~F9的功能</a>改寫了 F9 功能鍵，讓它回傳當前資料夾裡最新的檔名。這個功能通常使用在瀏覽器下載了某個檔案後，在命令行立即找回下載檔名，以省略做 <code>dir /od</code> 再選取、複製的操作。</p>
<p><span id="more-9169"></span></p>
<pre><code class="language-lua">nyagos.key.F9 = function(this)
  _iNewFilenameCounter = 1
  local _sFilename = nyagos.eval(&quot;ls -t *.* | head -n 1&quot;)

  if string.sub(_sFilename, -1) == &quot;*&quot; then
    _sFilename = _sFilename:sub(1, -2)
  end
  if (string.find(_sFilename, &quot; &quot;)) then
    _sFilename = &#039;&quot;&#039; .. _sFilename .. &#039;&quot;&#039;
  end
  nyagos.exec(&quot;echo &quot; .. _sFilename .. &quot; | clip&quot;)  -- 方便複製
  this:call(&quot;KILL_LINE&quot;)
  this:replacefrom(1,_sFilename)
  this:call(&quot;BEGINNING_OF_LINE&quot;)
end</code></pre>
<p>再增加<kbd>F10</kbd>或<kbd>Ctrl+Z</kbd>以 fzf 選單來選取當前資料夾的檔名，按<kbd>Enter</kbd>後傳回檔名，並將游標移到最開頭：</p>
<pre><code class="language-lua">-- file selection in current folder
-- | grep -v &quot;^d&quot; removes folder
function list_files(this)

  local _sQuery = this:lastword()
  local _sCmd = &#039;ll | grep -v &quot;^d&quot;| fzf --cycle --tac --layout=reverse &#039;
  if (string.len(_sQuery) &gt; 0) then
    _sCmd = _sCmd .. &quot;--query=&quot; .. _sQuery
  end
  -- -rw-a-- 114K Dec  3 12:08:15 未確認 8091.crdownload
  --  tr -s &quot; &quot; 把字串中的多重空格壓縮成一個，則以空白分隔的欄位才會正確
  _sCmd = _sCmd .. &#039; |  tr -s &quot; &quot; | cut -d&quot; &quot; -f6-&#039;
  --print(&quot;cmd=&quot; .. _sCmd)
  local _sFilename = nyagos.eval(_sCmd)
  if _sFilename:match(&quot;%s&quot;) then  -- 含有空白
    _sFilename = &#039;&quot;&#039; .. _sFilename .. &#039;&quot;&#039;
  end
  nyagos.exec(&quot;echo &quot; .. _sFilename .. &quot; | clip&quot;)  -- 方便複製
  this:replacefrom(1,_sFilename)
  this:call(&quot;BEGINNING_OF_LINE&quot;)
end

nyagos.key.F10 = list_files
nyagos.key.C_Z = list_files</code></pre>
<h2>1. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 解說文章(繁體中文): <a href="https://jdev.tw/blog/9169/" target="_blank" data-wpel-link="internal">https://jdev.tw/blog/9169/</a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/lua-file-menu-nyagos" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/lua-file-menu-nyagos" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9150/lua-simulate-cmd-functions-f1-f9-in-nyagos" rel="bookmark" title="在Nyagos裡以Lua撰寫模擬命令提示字元 F1～F9的功能" target="_blank" data-wpel-link="internal">在Nyagos裡以Lua撰寫模擬命令提示字元 F1～F9的功能</a>  (0則留言, 2025/12/02)</li>
<li><a href="https://jdev.tw/blog/9154/nyagos-history-fzf-menu-reexecute-command" rel="bookmark" title="[Windows] Nyagos history與 fzf 共用：用選單選用要重新執行的命令" target="_blank" data-wpel-link="internal">[Windows] Nyagos history與 fzf 共用：用選單選用要重新執行的命令</a>  (0則留言, 2025/12/04)</li>
<li><a href="https://jdev.tw/blog/8665/nyagos%e5%89%af%e6%aa%94%e5%90%8d%e9%97%9c%e8%81%af%e7%9a%84%e8%bc%83%e5%a5%bd%e4%bd%9c%e6%b3%95" rel="bookmark" title="Nyagos副檔名關聯的較好作法" target="_blank" data-wpel-link="internal">Nyagos副檔名關聯的較好作法</a>  (0則留言, 2025/03/08)</li>
<li><a href="https://jdev.tw/blog/8433/learn-lua-by-nyagos-using-cfonts-to-generate-motd" rel="bookmark" title="用Nyagos學習Lua：以cfonts產生MOTD標語" target="_blank" data-wpel-link="internal">用Nyagos學習Lua：以cfonts產生MOTD標語</a>  (0則留言, 2024/04/20)</li>
<li><a href="https://jdev.tw/blog/8448/nyagos-open-control-panels" rel="bookmark" title="Nyagos開啟控制台檔案的方法" target="_blank" data-wpel-link="internal">Nyagos開啟控制台檔案的方法</a>  (0則留言, 2024/05/27)</li>
<li><a href="https://jdev.tw/blog/1651/dos-tips-clip-exe" rel="bookmark" title="DOS命令使用技巧1：最快把文字檔案貼入剪貼簿的方法" target="_blank" data-wpel-link="internal">DOS命令使用技巧1：最快把文字檔案貼入剪貼簿的方法</a>  (0則留言, 2010/02/27)</li>
<li><a href="https://jdev.tw/blog/8420/nyagos-the-hybrid-commandline-shell-between-unix-dos" rel="bookmark" title="打破Windows與UNIX的藩籬：nyagos－介於UNIX跟DOS之間的混血的CommandLine Shell" target="_blank" data-wpel-link="internal">打破Windows與UNIX的藩籬：nyagos－介於UNIX跟DOS之間的混血的CommandLine Shell</a>  (0則留言, 2024/04/14)</li>
<li><a href="https://jdev.tw/blog/15/%e6%96%b9%e4%be%bf%e4%bd%86%e5%b8%b8%e6%9c%83%e5%bf%98%e4%ba%86%e7%9a%84%e6%8c%87%e4%bb%a4" rel="bookmark" title="方便但常會忘了的指令" target="_blank" data-wpel-link="internal">方便但常會忘了的指令</a>  (0則留言, 2004/12/15)</li>
<li><a href="https://jdev.tw/blog/8975/solved-nyagos-two-needs" rel="bookmark" title="[Windows] 解決了Nyagos的兩個需求" target="_blank" data-wpel-link="internal">[Windows] 解決了Nyagos的兩個需求</a>  (0則留言, 2025/10/17)</li>
<li><a href="https://jdev.tw/blog/7857/cmd-exe-mono-font" rel="bookmark" title="變更命令提示字元cmd exe的字型，更清楚、更美觀" target="_blank" data-wpel-link="internal">變更命令提示字元cmd exe的字型，更清楚、更美觀</a>  (0則留言, 2022/11/23)</li>
<li><a href="https://jdev.tw/blog/6931/how-to-stop-creating-tw-tmp" rel="bookmark" title="停止產生Windows 10／11怪異的空資料夾tw-＊.tmp的步驟" target="_blank" data-wpel-link="internal">停止產生Windows 10／11怪異的空資料夾tw-＊.tmp的步驟</a>  (0則留言, 2021/11/06)</li>
<li><a href="https://jdev.tw/blog/6249/incremental-search-grep-isgrep" rel="bookmark" title="[Windows] 漸進式全文檢索工具isGrep，光速版的grep" target="_blank" data-wpel-link="internal">[Windows] 漸進式全文檢索工具isGrep，光速版的grep</a>  (0則留言, 2020/05/01)</li>
<li><a href="https://jdev.tw/blog/4297/environment-variable-substring-comparing" rel="bookmark" title="使用批次檔簡化比對檔案的檔名輸入" target="_blank" data-wpel-link="internal">使用批次檔簡化比對檔案的檔名輸入</a>  (2則留言, 2014/10/13)</li>
<li><a href="https://jdev.tw/blog/1653/using-start-open-explorer" rel="bookmark" title="DOS命令使用技巧3：由DOS視窗將目前資料夾用檔案總管開啟的方法" target="_blank" data-wpel-link="internal">DOS命令使用技巧3：由DOS視窗將目前資料夾用檔案總管開啟的方法</a>  (0則留言, 2010/02/27)</li>
<li><a href="https://jdev.tw/blog/8701/automatic-search-filmora-exe-and-execute-method-using-es-exe-and-vbscript" rel="bookmark" title="自動搜尋Filmora.exe並執行的方法：使用es.exe與VBScript" target="_blank" data-wpel-link="internal">自動搜尋Filmora.exe並執行的方法：使用es.exe與VBScript</a>  (0則留言, 2025/03/24)</li>
</ul>
<p><!-- Similar Posts took 11.896 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9169/lua-file-menu-nyagos/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[Windows] Nyagos history與 fzf 共用：用選單選用要重新執行的命令</title>
		<link>https://jdev.tw/blog/9154/nyagos-history-fzf-menu-reexecute-command</link>
					<comments>https://jdev.tw/blog/9154/nyagos-history-fzf-menu-reexecute-command#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Thu, 04 Dec 2025 04:05:52 +0000</pubDate>
				<category><![CDATA[Windows學習誌]]></category>
		<category><![CDATA[系統、調校]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[nyagos]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9154</guid>

					<description><![CDATA[在Bash裡，命令行按Ctrl+R可以搜尋執行過的命令，Nyagos也實作了相同功能，也能用history列出命令歷史，再用 !命令索引編號 就能重覆執行指定索引位置的命令，但現在已經2025年了，當&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9154" class="pvc_stats all  " data-element-id="9154" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>在Bash裡，命令行按<kbd>Ctrl+R</kbd>可以搜尋執行過的命令，Nyagos也實作了相同功能，也能用<code>history</code>列出命令歷史，再用 <code>!命令索引編號</code> 就能重覆執行指定索引位置的命令，但現在已經2025年了，當然要用選擇的方式來快速執行。</p>
<p><span id="more-9154"></span></p>
<p>Nyagos提供了 <code>nyagos.box()</code> 可以將陣列形成選單供使用者選擇，歷史選單的熱鍵是<kbd>Alt+R</kbd>(應該是和<kbd>Ctrl+R</kbd>相應)，下面這行就能產生命令歷史選單：</p>
<pre><code class="language-lua">local result = nyagos.box(share.__dump_history())</code></pre>
<p>▼ 按<kbd>Alt+R</kbd>，按上下鍵移動，按<kbd>Enter</kbd>取回命令<br />
<img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2025/1764518284000swxbj4.png" alt="gh|700" /></p>
<p>雖然<kbd>Alt+R</kbd>選單帶來一些便利，但它並沒有漸進式過濾的功能，不如改與 <a href="https://youtu.be/Atp7YvwHHig" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">fzf<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 整合，不僅可以過濾、更美觀，也有更多功能。</p>
<p>為了fzf整合，用Lua寫了一個Alias <strong>hf</strong>和熱鍵 <kbd>Ctrl+W</kbd>。</p>
<p>fzf 可由<a href="https://github.com/junegunn/fzf/releases" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">fzf GitHub<span class="wpel-icon wpel-image wpel-icon-6"></span></a>下載，awk.exe則由<a href="https://github.com/bmatzelle/gow" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Gow (Gnu On Windows)<span class="wpel-icon wpel-image wpel-icon-6"></span></a>下載。</p>
<h2>1. Alias hf</h2>
<ul>
<li>用 Alias <code>hf</code> 以倒序方式顯示出命令的索引號、執行時間供選用，選單出現後可以再輸入過濾字串，也可以用 <code>hf 過濾字串</code> 在執行時先行輸入過濾字串。</li>
<li>fzf裡用上下鍵移動到要重覆執行的命令再按<kbd>Enter</kbd>即能將該命令帶回命令行</li>
</ul>
<p><img decoding="async" src="https://raw.githubusercontent.com/emisjerry/upgit/master/2025/1764519155000ouepwk.png" alt="gh|700" /></p>
<pre><code class="language-lua">nyagos.alias.hf = function(args)
  local _sQuery = &quot;&quot;
  if args[1] then _sQuery = args[1] end
  local _sResult = &quot;&quot;
  local _sCmd = &#039;history | fzf --cycle --tac --layout=reverse &#039;
  if string.len(_sQuery) &gt; 0 then _sCmd = _sCmd .. &#039;--query=&#039; .. _sQuery end
  _sCmd = _sCmd .. &#039; | awk &quot;{match($0, /\\] (.*) \\(/, arr); print arr[1]}&quot; &#039;
  _sResult = nyagos.eval(_sCmd)
  if (_sResult ~= &quot;&quot;) then
    print(&#039;Exec: &#039; .. _sResult .. &#039;\n&#039;)
    nyagos.setnextline(_sResult)  -- v4.4.19 available
  end
end</code></pre>
<ul>
<li>用 <code>history</code> 將命令歷史傳給 fzf 供選擇，按<kbd>Enter</kbd>後將游標位置整列傳給 <code>awk</code> 解析，取出 <code>]</code> 右方內容，再用<code>byagos.setnextline()</code>將命令寫回命令行</li>
<li><code>byagos.setnextline()</code> 是尚未釋出的 v4.4.19 才提供的功能，可由<a href="https://ci.appveyor.com/project/zetamatta/nyagos/build/job/4huabm5ywuvo1276/artifacts" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">最新Build區<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 取得測試檔</li>
</ul>
<h2>2. 熱鍵 Ctrl+W</h2>
<p>與 hf 大致相同，只是改成按鍵操作。Alias可透過 args 取得傳入參數，按鍵則使用 <code>this:lastword()</code> 取得命令行內容，因此可以用 <code>.docx</code><kbd>Ctrl+W</kbd>的方式使用過濾字串。</p>
<pre><code class="language-lua">nyagos.key.C_w = function(this)
  local _sQuery = this:lastword()
  local _sCmd = &#039;history | fzf --cycle --tac --layout=reverse &#039;
  if string.len(_sQuery) &gt; 0 then 
    _sCmd = _sCmd .. &#039;--query=&#039; .. _sQuery 
  end
  _sCmd = _sCmd .. &#039; | awk &quot;{match($0, /\\] (.*) \\(/, arr); print arr[1]}&quot;&#039;

  local _sResult = &quot;&quot;
  _sResult = nyagos.eval(_sCmd)
  if (_sResult ~= &quot;&quot;) then
    print(&#039;Exec: &#039; .. _sResult .. &#039;\n&#039;)
    return _sResult
  end
end</code></pre>
<h2>3. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 解說文章(繁體中文): <a href="https://jdev.tw/blog/9154/" target="_blank" data-wpel-link="internal">https://jdev.tw/blog/9154/</a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/nyagos-history-fzf-menu-reexecute-command" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/nyagos-history-fzf-menu-reexecute-command" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://github.com/bmatzelle/gow" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">bmatzelle/gow: Unix command line utilities installer for Windows.<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://github.com/junegunn/fzf" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">junegunn/fzf: :cherry_blossom: A command-line fuzzy finder<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9169/lua-file-menu-nyagos" rel="bookmark" title="在Nyagos裡以Lua撰寫當前資料夾檔案選單，以快速取回檔名" target="_blank" data-wpel-link="internal">在Nyagos裡以Lua撰寫當前資料夾檔案選單，以快速取回檔名</a>  (0則留言, 2025/12/12)</li>
<li><a href="https://jdev.tw/blog/9150/lua-simulate-cmd-functions-f1-f9-in-nyagos" rel="bookmark" title="在Nyagos裡以Lua撰寫模擬命令提示字元 F1～F9的功能" target="_blank" data-wpel-link="internal">在Nyagos裡以Lua撰寫模擬命令提示字元 F1～F9的功能</a>  (0則留言, 2025/12/02)</li>
<li><a href="https://jdev.tw/blog/8433/learn-lua-by-nyagos-using-cfonts-to-generate-motd" rel="bookmark" title="用Nyagos學習Lua：以cfonts產生MOTD標語" target="_blank" data-wpel-link="internal">用Nyagos學習Lua：以cfonts產生MOTD標語</a>  (0則留言, 2024/04/20)</li>
<li><a href="https://jdev.tw/blog/8420/nyagos-the-hybrid-commandline-shell-between-unix-dos" rel="bookmark" title="打破Windows與UNIX的藩籬：nyagos－介於UNIX跟DOS之間的混血的CommandLine Shell" target="_blank" data-wpel-link="internal">打破Windows與UNIX的藩籬：nyagos－介於UNIX跟DOS之間的混血的CommandLine Shell</a>  (0則留言, 2024/04/14)</li>
<li><a href="https://jdev.tw/blog/8448/nyagos-open-control-panels" rel="bookmark" title="Nyagos開啟控制台檔案的方法" target="_blank" data-wpel-link="internal">Nyagos開啟控制台檔案的方法</a>  (0則留言, 2024/05/27)</li>
<li><a href="https://jdev.tw/blog/6114/wsl2-zsh-basic-operations" rel="bookmark" title="[WSL #4] 熟練Oh-My-Zsh基本操作，快速變身為鍵盤高手" target="_blank" data-wpel-link="internal">[WSL #4] 熟練Oh-My-Zsh基本操作，快速變身為鍵盤高手</a>  (0則留言, 2020/02/21)</li>
<li><a href="https://jdev.tw/blog/8665/nyagos%e5%89%af%e6%aa%94%e5%90%8d%e9%97%9c%e8%81%af%e7%9a%84%e8%bc%83%e5%a5%bd%e4%bd%9c%e6%b3%95" rel="bookmark" title="Nyagos副檔名關聯的較好作法" target="_blank" data-wpel-link="internal">Nyagos副檔名關聯的較好作法</a>  (0則留言, 2025/03/08)</li>
<li><a href="https://jdev.tw/blog/8975/solved-nyagos-two-needs" rel="bookmark" title="[Windows] 解決了Nyagos的兩個需求" target="_blank" data-wpel-link="internal">[Windows] 解決了Nyagos的兩個需求</a>  (0則留言, 2025/10/17)</li>
<li><a href="https://jdev.tw/blog/1651/dos-tips-clip-exe" rel="bookmark" title="DOS命令使用技巧1：最快把文字檔案貼入剪貼簿的方法" target="_blank" data-wpel-link="internal">DOS命令使用技巧1：最快把文字檔案貼入剪貼簿的方法</a>  (0則留言, 2010/02/27)</li>
<li><a href="https://jdev.tw/blog/7857/cmd-exe-mono-font" rel="bookmark" title="變更命令提示字元cmd exe的字型，更清楚、更美觀" target="_blank" data-wpel-link="internal">變更命令提示字元cmd exe的字型，更清楚、更美觀</a>  (0則留言, 2022/11/23)</li>
<li><a href="https://jdev.tw/blog/6191/multi-instances-command-prompt-shared-history" rel="bookmark" title="[AHK#32] 讓多個cmd.exe共用命令歷史的變通作法（跨Session共用）" target="_blank" data-wpel-link="internal">[AHK#32] 讓多個cmd.exe共用命令歷史的變通作法（跨Session共用）</a>  (0則留言, 2020/03/28)</li>
<li><a href="https://jdev.tw/blog/8701/automatic-search-filmora-exe-and-execute-method-using-es-exe-and-vbscript" rel="bookmark" title="自動搜尋Filmora.exe並執行的方法：使用es.exe與VBScript" target="_blank" data-wpel-link="internal">自動搜尋Filmora.exe並執行的方法：使用es.exe與VBScript</a>  (0則留言, 2025/03/24)</li>
<li><a href="https://jdev.tw/blog/3919/bash-style-readline-for-cmd-exe" rel="bookmark" title="clink：擴充cmd.exe成為Bash readline命令行的強大編輯功能" target="_blank" data-wpel-link="internal">clink：擴充cmd.exe成為Bash readline命令行的強大編輯功能</a>  (0則留言, 2014/04/26)</li>
<li><a href="https://jdev.tw/blog/6069/windows-terminal-introduction" rel="bookmark" title="Windows命令行新選擇：Windows Terminal（終端機）" target="_blank" data-wpel-link="internal">Windows命令行新選擇：Windows Terminal（終端機）</a>  (0則留言, 2020/01/11)</li>
<li><a href="https://jdev.tw/blog/6608/windows-terminal-1-7-preview" rel="bookmark" title="Windows Terminal 1.7 新功能" target="_blank" data-wpel-link="internal">Windows Terminal 1.7 新功能</a>  (0則留言, 2021/03/28)</li>
</ul>
<p><!-- Similar Posts took 36.941 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9154/nyagos-history-fzf-menu-reexecute-command/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在Nyagos裡以Lua撰寫模擬命令提示字元 F1～F9的功能</title>
		<link>https://jdev.tw/blog/9150/lua-simulate-cmd-functions-f1-f9-in-nyagos</link>
					<comments>https://jdev.tw/blog/9150/lua-simulate-cmd-functions-f1-f9-in-nyagos#respond</comments>
		
		<dc:creator><![CDATA[簡睿🆕]]></dc:creator>
		<pubDate>Tue, 02 Dec 2025 01:29:24 +0000</pubDate>
				<category><![CDATA[Windows學習誌]]></category>
		<category><![CDATA[系統、調校]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[nyagos]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://jdev.tw/blog/?p=9150</guid>

					<description><![CDATA[Windows 命令提示字元 cmd.exe 的常用功能鍵說明如下(AI彙總)： 功能鍵 功能說明 使用範例 F1 逐字複製上一條命令，每按一次輸入一個字元 上一命令是 dir，連按三次 F1 → 得&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<div class="pvc_clear"></div>
<p id="pvc_stats_9150" class="pvc_stats all  " data-element-id="9150" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="http://jdev.tw/blog/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>Windows 命令提示字元 cmd.exe 的常用功能鍵說明如下(AI彙總)：</p>
<table>
<thead>
<tr>
<th>功能鍵</th>
<th>功能說明</th>
<th>使用範例</th>
</tr>
</thead>
<tbody>
<tr>
<td>F1</td>
<td>逐字複製上一條命令，每按一次輸入一個字元</td>
<td>上一命令是 <code>dir</code>，連按三次 F1 → 得到 <code>dir</code></td>
</tr>
<tr>
<td>F2</td>
<td>從上一條命令複製到指定字元為止</td>
<td>上一命令是 <code>dir</code>，按 F2 輸入 <code>r</code> → 得到 <code>di</code></td>
</tr>
<tr>
<td>F3</td>
<td>重複上一條完整命令</td>
<td>上一命令是 <code>ipconfig</code>，按 F3 → 自動輸入 <code>ipconfig</code></td>
</tr>
<tr>
<td>F4</td>
<td>刪除從游標位置到指定字元之間的內容</td>
<td>輸入 <code>cd Program Files</code>，游標在 <code>d</code>，按 F4 輸入 <code>a</code> → 變成 <code>cam Files</code></td>
</tr>
<tr>
<td>F5</td>
<td>循環歷史命令（依序顯示更早的命令）</td>
<td>連續按 F5 → 依序輸入更早的命令</td>
</tr>
<tr>
<td>F6</td>
<td>插入 <code>^Z</code> (EOF，End Of File)</td>
<td>在輸入中按 F6 → 插入 <code>^Z</code>，結束輸入</td>
</tr>
<tr>
<td>F7</td>
<td>顯示命令歷史清單，可用方向鍵選擇</td>
<td>按 F7 → 出現清單，選擇 <code>ping google.com</code></td>
</tr>
<tr>
<td>F8</td>
<td>循環歷史命令（逐一顯示符合目前輸入的命令）</td>
<td>輸入 <code>d</code>，按 F8 → 顯示以 <code>d</code> 開頭的命令，如 <code>dir</code></td>
</tr>
<tr>
<td>F9</td>
<td>依編號執行歷史命令</td>
<td>按 F7 查看清單，假設 <code>ipconfig</code> 是編號 3 → 按 F9 輸入 <code>3</code> → 執行 <code>ipconfig</code></td>
</tr>
</tbody>
</table>
<p><span id="more-9150"></span></p>
<p>我以下列Lua腳本重新實作了類似功能，其中 F5 可以用上下鍵顯示命令歷史，F6不再使用，F7可以用 <code>history | fzf</code>，F9改成傳回當前資料夾裡最新的檔名：</p>
<p><script src="https://gist.github.com/emisjerry/c902c33d09e84cbf3a9b26a9ec5b3661.js"></script></p>
<pre><code class="language-lua">-- When you press F2, the command prompt asks you to type a character.
-- It then copies the previous command up to (but not including) that character.
nyagos.key.f2 = function(this)
  local _sCmdLine = this.text;
  if (this.pos &gt; 1) then
    this:call(&quot;BEGINNING_OF_LINE&quot;)
  end      
  nyagos.write(&quot;\nEnter char to copy up to: &quot;)
  local _sKey=nyagos.getkeys()
  nyagos.write(&quot;\r\027[K\027[A&quot;)
  this:repaint()
  local _iPos = string.find(_sCmdLine, _sKey, 1, true)
  if _iPos then
    for i = 1, _iPos-1 do
      this:call(&quot;FORWARD_CHAR&quot;)
    end
  end
  --this:replacefrom(1,key)
end

-- F1 → Repeats the last command one character at a time.
nyagos.key.f1 = function(this)
  local _sCmdLine = nyagos.history[#nyagos.history-1]
  local _iPos = this.pos
  _sNewCmdLine = string.sub(_sCmdLine, 1, _iPos)
  this:replacefrom(1,_sNewCmdLine)
end

-- F3 → Repeats the entire last command.
nyagos.key.f3 = function(this)
  local _sCmdLine = nyagos.history[#nyagos.history-1]
  _sNewCmdLine = string.sub(_sCmdLine, 1, _iPos)
  this:replacefrom(1,_sCmdLine)
  this:call(&quot;BEGINNING_OF_LINE&quot;)
end

-- F4 → It deletes all characters from the current cursor position up to (and including) the next character you type.
-- Example: echo_HelloWorld. _ is the Cursor position. 
--   Press F4 &amp; W, Result: echo World.
nyagos.key.f4 = function(this)
  local _sCmdLine = this.text
  local _iCurrentPos = this.pos
  nyagos.write(&quot;\nEnter char to delete up to: &quot;)
  local _sKey = nyagos.getkeys()
  nyagos.write(&quot;\r\027[K\027[A&quot;)
  this:repaint()
  local _iPos = string.find(_sCmdLine, _sKey, 1, true)
  if _iPos then
    local _sNewCmdLine = string.sub(_sCmdLine, 1, _iCurrentPos) .. string.sub(_sCmdLine, _iPos)
    --print(&quot;\n\nnew command=&quot; .. _sNewCmdLine)
    this:call(&quot;KILL_LINE&quot;)
    this:replacefrom(1,_sNewCmdLine)

    -- Move cursor back to starting position
    this:call(&quot;BEGINNING_OF_LINE&quot;)
    for i = 1, _iCurrentPos do
      this:call(&quot;FORWARD_CHAR&quot;)
    end
  end
end

-- F7 → Shows a list of command history to choose from.
nyagos.key.f7 = function(this)
  this:call(&quot;REPAINT_ON_NEWLINE&quot;)
  result = nyagos.box(share.__dump_history())
  this:call(&quot;REPAINT_ON_NEWLINE&quot;)
  return result
end

nyagos.key.END = function(this)
  this:call(&quot;END_OF_LINE&quot;)
end

-- return the newest filename
nyagos.key.F9 = function(this)
  local _sFilename = nyagos.eval(&quot;ls -t *.* | head -n 1&quot;)
  if string.sub(_sFilename, -1) == &quot;*&quot; then
    _sFilename = _sFilename:sub(1, -2)
  end
  this:replacefrom(1,_sFilename)
  this:call(&quot;BEGINNING_OF_LINE&quot;)
end</code></pre>
<h2>1. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 相關鏈接</h2>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 解說文章(繁體中文):<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-en/p/lua-simulate-cmd-functions-f1-f9-in-nyagos" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">Explanation article(English)<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quaily.com/jdevtw-jp/p/lua-simulate-cmd-functions-f1-f9-in-nyagos" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">解説記事(日本語)<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://gist.github.com/emisjerry/c902c33d09e84cbf3a9b26a9ec5b3661" target="_blank" data-wpel-link="external" rel="external noopener noreferrer" class="wpel-icon-right">GitHub my_init.lua<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>
<p>＃＃</p>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49e.png" alt="💞" class="wp-smiley" style="height: 1em; max-height: 1em;" />您可能也會有興趣的類似文章</strong></p>
<ul class="similar-posts">
<li><a href="https://jdev.tw/blog/9169/lua-file-menu-nyagos" rel="bookmark" title="在Nyagos裡以Lua撰寫當前資料夾檔案選單，以快速取回檔名" target="_blank" data-wpel-link="internal">在Nyagos裡以Lua撰寫當前資料夾檔案選單，以快速取回檔名</a>  (0則留言, 2025/12/12)</li>
<li><a href="https://jdev.tw/blog/9154/nyagos-history-fzf-menu-reexecute-command" rel="bookmark" title="[Windows] Nyagos history與 fzf 共用：用選單選用要重新執行的命令" target="_blank" data-wpel-link="internal">[Windows] Nyagos history與 fzf 共用：用選單選用要重新執行的命令</a>  (0則留言, 2025/12/04)</li>
<li><a href="https://jdev.tw/blog/7857/cmd-exe-mono-font" rel="bookmark" title="變更命令提示字元cmd exe的字型，更清楚、更美觀" target="_blank" data-wpel-link="internal">變更命令提示字元cmd exe的字型，更清楚、更美觀</a>  (0則留言, 2022/11/23)</li>
<li><a href="https://jdev.tw/blog/8433/learn-lua-by-nyagos-using-cfonts-to-generate-motd" rel="bookmark" title="用Nyagos學習Lua：以cfonts產生MOTD標語" target="_blank" data-wpel-link="internal">用Nyagos學習Lua：以cfonts產生MOTD標語</a>  (0則留言, 2024/04/20)</li>
<li><a href="https://jdev.tw/blog/1651/dos-tips-clip-exe" rel="bookmark" title="DOS命令使用技巧1：最快把文字檔案貼入剪貼簿的方法" target="_blank" data-wpel-link="internal">DOS命令使用技巧1：最快把文字檔案貼入剪貼簿的方法</a>  (0則留言, 2010/02/27)</li>
<li><a href="https://jdev.tw/blog/8448/nyagos-open-control-panels" rel="bookmark" title="Nyagos開啟控制台檔案的方法" target="_blank" data-wpel-link="internal">Nyagos開啟控制台檔案的方法</a>  (0則留言, 2024/05/27)</li>
<li><a href="https://jdev.tw/blog/8665/nyagos%e5%89%af%e6%aa%94%e5%90%8d%e9%97%9c%e8%81%af%e7%9a%84%e8%bc%83%e5%a5%bd%e4%bd%9c%e6%b3%95" rel="bookmark" title="Nyagos副檔名關聯的較好作法" target="_blank" data-wpel-link="internal">Nyagos副檔名關聯的較好作法</a>  (0則留言, 2025/03/08)</li>
<li><a href="https://jdev.tw/blog/53/dos-%e5%91%bd%e4%bb%a4%e6%8f%90%e7%a4%ba%e5%ad%97%e5%85%83-%e7%9a%84%e5%b7%a8%e9%9b%86%e5%8a%9f%e8%83%bd" rel="bookmark" title="DOS (命令提示字元) 的巨集功能" target="_blank" data-wpel-link="internal">DOS (命令提示字元) 的巨集功能</a>  (3則留言, 2005/01/18)</li>
<li><a href="https://jdev.tw/blog/8975/solved-nyagos-two-needs" rel="bookmark" title="[Windows] 解決了Nyagos的兩個需求" target="_blank" data-wpel-link="internal">[Windows] 解決了Nyagos的兩個需求</a>  (0則留言, 2025/10/17)</li>
<li><a href="https://jdev.tw/blog/6191/multi-instances-command-prompt-shared-history" rel="bookmark" title="[AHK#32] 讓多個cmd.exe共用命令歷史的變通作法（跨Session共用）" target="_blank" data-wpel-link="internal">[AHK#32] 讓多個cmd.exe共用命令歷史的變通作法（跨Session共用）</a>  (0則留言, 2020/03/28)</li>
<li><a href="https://jdev.tw/blog/6636/command-line-get-folder-path-into-clipboard" rel="bookmark" title="在命令提示字元取得目前資料夾路徑的方法—使用set /p｜初學者的命令行＃10" target="_blank" data-wpel-link="internal">在命令提示字元取得目前資料夾路徑的方法—使用set /p｜初學者的命令行＃10</a>  (0則留言, 2021/04/22)</li>
<li><a href="https://jdev.tw/blog/8420/nyagos-the-hybrid-commandline-shell-between-unix-dos" rel="bookmark" title="打破Windows與UNIX的藩籬：nyagos－介於UNIX跟DOS之間的混血的CommandLine Shell" target="_blank" data-wpel-link="internal">打破Windows與UNIX的藩籬：nyagos－介於UNIX跟DOS之間的混血的CommandLine Shell</a>  (0則留言, 2024/04/14)</li>
<li><a href="https://jdev.tw/blog/3590/give-cmd-exe-a-title" rel="bookmark" title="以title命令賦予命令提示字元（cmd.exe）不同的標題名稱以增加辨識度" target="_blank" data-wpel-link="internal">以title命令賦予命令提示字元（cmd.exe）不同的標題名稱以增加辨識度</a>  (0則留言, 2013/10/29)</li>
<li><a href="https://jdev.tw/blog/6114/wsl2-zsh-basic-operations" rel="bookmark" title="[WSL #4] 熟練Oh-My-Zsh基本操作，快速變身為鍵盤高手" target="_blank" data-wpel-link="internal">[WSL #4] 熟練Oh-My-Zsh基本操作，快速變身為鍵盤高手</a>  (0則留言, 2020/02/21)</li>
<li><a href="https://jdev.tw/blog/6608/windows-terminal-1-7-preview" rel="bookmark" title="Windows Terminal 1.7 新功能" target="_blank" data-wpel-link="internal">Windows Terminal 1.7 新功能</a>  (0則留言, 2021/03/28)</li>
</ul>
<p><!-- Similar Posts took 16.140 ms --></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jdev.tw/blog/9150/lua-simulate-cmd-functions-f1-f9-in-nyagos/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
