mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-27 01:56:43 +00:00
16 lines
3.7 KiB
JavaScript
16 lines
3.7 KiB
JavaScript
import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
|
||
const __pageData = JSON.parse('{"title":"Tab Completion for QMK","description":"","frontmatter":{},"headers":[],"relativePath":"cli_tab_complete.md","filePath":"cli_tab_complete.md"}');
|
||
const _sfc_main = { name: "cli_tab_complete.md" };
|
||
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="tab-completion-for-qmk" tabindex="-1">Tab Completion for QMK <a class="header-anchor" href="#tab-completion-for-qmk" aria-label="Permalink to "Tab Completion for QMK""></a></h1><p>If you are using Bash 4.2 or later, Zsh, or FiSH you can enable Tab Completion for the QMK CLI. This will let you tab complete the names of flags, keyboards, files, and other <code>qmk</code> options.</p><h2 id="setup" tabindex="-1">Setup <a class="header-anchor" href="#setup" aria-label="Permalink to "Setup""></a></h2><p>There are several ways you can setup tab completion.</p><h3 id="for-your-user-only" tabindex="-1">For Your User Only <a class="header-anchor" href="#for-your-user-only" aria-label="Permalink to "For Your User Only""></a></h3><p>Add this to the end of your <code>.profile</code> or <code>.bashrc</code>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>source ~/qmk_firmware/util/qmk_tab_complete.sh</span></span></code></pre></div><p>If you put <code>qmk_firmware</code> into another location you will need to adjust this path.</p><p>Zsh users will need to load <code>bashcompinit</code>. The following can be added to <code>~/.zshrc</code> file:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>autoload -Uz bashcompinit && bashcompinit</span></span></code></pre></div><h3 id="system-wide-symlink" tabindex="-1">System Wide Symlink <a class="header-anchor" href="#system-wide-symlink" aria-label="Permalink to "System Wide Symlink""></a></h3><p>If you want the tab completion available to all users of the system you can add a symlink to the <code>qmk_tab_complete.sh</code> script:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh</span></span></code></pre></div><h3 id="system-wide-copy" tabindex="-1">System Wide Copy <a class="header-anchor" href="#system-wide-copy" aria-label="Permalink to "System Wide Copy""></a></h3><p>In some cases a symlink may not work. Instead you can copy the file directly into place. Be aware that updates to the tab complete script may happen from time to time, you will want to recopy the file periodically.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>cp util/qmk_tab_complete.sh /etc/profile.d</span></span></code></pre></div>', 16);
|
||
const _hoisted_17 = [
|
||
_hoisted_1
|
||
];
|
||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return openBlock(), createElementBlock("div", null, _hoisted_17);
|
||
}
|
||
const cli_tab_complete = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||
export {
|
||
__pageData,
|
||
cli_tab_complete as default
|
||
};
|