Files
fish-config/docs/html/8-4-abbreviations.html
T
2026-06-08 21:09:54 +00:00

642 lines
20 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="Rootiest" />
<title>4. ABBREVIATIONS</title>
<style>
div.sitenav { display: flex; flex-direction: row; flex-wrap: wrap; }
span.navlink { flex: 1; }
span.navlink-label { display: inline-block; min-width: 4em; }
html {
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 12px;
}
h1 {
font-size: 1.8em;
}
}
@media print {
html {
background-color: white;
}
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
font-size: 85%;
margin: 0;
hyphens: manual;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<style>
/* ── Catppuccin Latte (light) / Mocha (dark) ─────────────────── */
:root {
color-scheme: light dark;
--bg: #eff1f5;
--surface: #e6e9ef;
--overlay: #ccd0da;
--text: #4c4f69;
--sub1: #6c6f85;
--sub0: #8c8fa1;
--blue: #1e66f5;
--lavender: #7287fd;
--sapphire: #209fb5;
--green: #40a02b;
--yellow: #df8e1d;
--peach: #fe640b;
--mauve: #8839ef;
--code-bg: #dce0e8;
--border: #bcc0cc;
--glow1: rgba(30, 102, 245, 0.05);
--glow2: rgba(136, 57, 239, 0.04);
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1e1e2e;
--surface: #313244;
--overlay: #45475a;
--text: #cdd6f4;
--sub1: #bac2de;
--sub0: #a6adc8;
--blue: #89b4fa;
--lavender: #b4befe;
--sapphire: #74c7ec;
--green: #a6e3a1;
--yellow: #f9e2af;
--peach: #fab387;
--mauve: #cba6f7;
--code-bg: #181825;
--border: #45475a;
--glow1: rgba(137, 180, 250, 0.06);
--glow2: rgba(203, 166, 247, 0.05);
}
}
*, *::before, *::after { box-sizing: border-box; }
html {
background-color: var(--bg);
background-image:
radial-gradient(ellipse 55% 40% at 10% 5%, var(--glow1) 0%, transparent 100%),
radial-gradient(ellipse 45% 45% at 90% 95%, var(--glow2) 0%, transparent 100%);
min-height: 100%;
}
body {
color: var(--text);
font-family: system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;
font-size: 16px;
line-height: 1.75;
max-width: 880px;
margin: 0 auto;
padding: 2rem 2.5rem 5rem;
min-height: 100vh;
}
/* ── Links ─────────────────────────────────────────────────── */
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--lavender); text-decoration: underline; }
a:visited { color: var(--lavender); }
/* ── Headings ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
color: var(--lavender);
line-height: 1.3;
margin-top: 2em;
margin-bottom: 0.5em;
}
h1 {
font-size: 1.9rem;
color: var(--text);
border-bottom: 1px solid var(--border);
padding-bottom: 0.4em;
margin-top: 1.2em;
}
h2 {
font-size: 1.35rem;
border-bottom: 1px solid var(--border);
padding-bottom: 0.2em;
}
h3 { font-size: 1.1rem; color: var(--sapphire); }
h4 { font-size: 0.95rem; color: var(--sub1); }
p { margin: 0.8em 0; }
/* ── Title block (pandoc-generated cover) ──────────────────── */
#title-block-header {
text-align: center;
padding: 2.5rem 0 2rem;
margin-bottom: 1.5rem;
border-bottom: 1px solid var(--border);
}
#title-block-header .title {
font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
font-size: 2.6rem;
letter-spacing: 0.12em;
color: var(--lavender);
border: none;
margin: 0 0 0.75rem;
}
#title-block-header .author,
#title-block-header .date {
color: var(--sub0);
font-size: 0.875rem;
margin: 0.2rem 0;
}
/* ── Inline code ───────────────────────────────────────────── */
code {
font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
background: var(--code-bg);
color: var(--peach);
padding: 0.15em 0.4em;
border-radius: 4px;
font-size: 0.875em;
}
/* ── Code blocks ───────────────────────────────────────────── */
pre {
background: var(--code-bg);
border: 1px solid var(--border);
border-left: 3px solid var(--sapphire);
border-radius: 0 8px 8px 0;
padding: 1.1em 1.4em;
overflow-x: auto;
line-height: 1.55;
margin: 1.2em 0;
}
pre code {
background: none;
color: var(--text);
padding: 0;
font-size: 0.88em;
}
/* ── Blockquotes ───────────────────────────────────────────── */
blockquote {
border-left: 3px solid var(--yellow);
margin: 1.5em 0;
padding: 0.75em 1.25em;
background: var(--surface);
color: var(--sub1);
border-radius: 0 6px 6px 0;
}
blockquote p { margin: 0.3em 0; }
/* ── Tables ────────────────────────────────────────────────── */
table {
border-collapse: collapse;
width: 100%;
margin: 1.4em 0;
font-size: 0.93em;
}
th, td {
border: 1px solid var(--border);
padding: 0.55em 0.9em;
text-align: left;
}
th {
background: var(--surface);
color: var(--lavender);
font-weight: 600;
font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
font-size: 0.82em;
letter-spacing: 0.06em;
text-transform: uppercase;
}
tr:nth-child(even) { background: var(--surface); }
tr:hover { background: var(--overlay); }
/* ── HR ────────────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }
/* ── Lists ─────────────────────────────────────────────────── */
ul, ol { padding-left: 1.6em; }
li { margin: 0.35em 0; }
/* ── Chunk navigation bar (prev / up / next) ───────────────── */
nav:not(#TOC):not([role="doc-toc"]) {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
margin: 1.5em 0;
font-size: 0.875em;
overflow: hidden;
}
nav:not(#TOC):not([role="doc-toc"]) p {
margin: 0;
padding: 0.65em 1.2em;
display: flex;
gap: 0.4em 1.75em;
flex-wrap: wrap;
align-items: center;
}
/* JS wraps each "Label: <a>" pair in .nav-item so they flex as a unit */
.nav-item {
display: inline-flex;
align-items: center;
gap: 0.3em;
white-space: nowrap;
}
.nav-item a { color: var(--blue); }
.nav-item a:hover { color: var(--lavender); }
/* ── Table of contents panel ───────────────────────────────── */
nav#TOC, nav[role="doc-toc"] {
display: block;
background: var(--surface);
border: 1px solid var(--border);
border-left: 3px solid var(--lavender);
border-radius: 0 8px 8px 0;
padding: 1.2em 1.5em;
margin: 1.5em 0;
}
nav#TOC > h2,
nav[role="doc-toc"] > h2 {
font-size: 0.7rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--sub0);
border: none;
margin: 0 0 0.9em;
padding: 0;
}
nav#TOC ul, nav[role="doc-toc"] ul {
list-style: none;
padding-left: 1em;
margin: 0.25em 0;
}
nav#TOC > ul, nav[role="doc-toc"] > ul { padding-left: 0; }
nav#TOC li, nav[role="doc-toc"] li {
margin: 0.3em 0;
padding-left: 0.75em;
border-left: 1px solid transparent;
transition: border-color 0.12s;
}
nav#TOC li:hover, nav[role="doc-toc"] li:hover {
border-left-color: var(--lavender);
}
nav#TOC a, nav[role="doc-toc"] a {
color: var(--sub1);
font-size: 0.9em;
}
nav#TOC a:hover, nav[role="doc-toc"] a:hover {
color: var(--lavender);
text-decoration: none;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
/* ── Hide ToC on every page except index.html ───────────── */
var path = location.pathname;
var onIndex = path === '/' || path === '' || /\/index\.html(\?.*)?$/.test(path);
if (!onIndex) {
var toc = document.getElementById('TOC') ||
document.querySelector('[role="doc-toc"]');
if (toc) toc.remove();
}
/* ── Wrap each "Label: <a>" pair in a .nav-item span ───────
Pandoc emits label text nodes and anchors as siblings;
flex sees them as separate items, causing labels to split
from their links when wrapping. Grouping them in a span
keeps each label+link as a single flex unit. */
document.querySelectorAll('nav:not(#TOC):not([role="doc-toc"])').forEach(function (nav) {
var p = nav.querySelector('p');
if (!p) return;
var children = Array.from(p.childNodes);
var pairs = [];
for (var i = 0; i + 1 < children.length; i++) {
var cur = children[i];
var nxt = children[i + 1];
if (cur.nodeType === Node.TEXT_NODE &&
/[A-Z][a-z]*:\s*/.test(cur.textContent) &&
nxt.nodeType === Node.ELEMENT_NODE &&
nxt.tagName === 'A') {
pairs.push([cur, nxt]);
i++; // skip the anchor on the next iteration
}
}
pairs.forEach(function (pair) {
var span = document.createElement('span');
span.className = 'nav-item';
p.insertBefore(span, pair[0]);
span.appendChild(pair[0]);
span.appendChild(pair[1]);
});
});
});
</script>
</head>
<body>
<nav id="sitenav">
<div class="sitenav">
<span class="navlink">
<span class="navlink-label">Up:</span> <a href="index.html" accesskey="u" rel="up">FISH-CONFIG</a>
</span>
<span class="navlink">
<span class="navlink-label">Top:</span> <a href="index.html" accesskey="t" rel="top">FISH-CONFIG</a>
</span>
</div>
<div class="sitenav">
<span class="navlink">
<span class="navlink-label">Next:</span> <a href="9-5-functions-reference.html" accesskey="n" rel="next">5. FUNCTIONS REFERENCE</a>
</span>
<span class="navlink">
<span class="navlink-label">Previous:</span> <a href="7-3-key-bindings.html" accesskey="p" rel="previous">3. KEY BINDINGS</a>
</span>
</div>
</nav>
<h1 data-number="8" id="4-abbreviations">4. ABBREVIATIONS</h1>
<p>Abbreviations expand when you press Space or Enter. They are
terminal-aware: some expand differently in Kitty vs WezTerm vs other
terminals.</p>
<h2 data-number="8.1" id="41-editors">4.1 Editors</h2>
<pre><code>n / nv / neovim nvim
e edit
se sudoedit
k kate
editt Open new tab with nvim (terminal-aware)
cdnv cd ~/.config/nvim
cdnvn cd ~/.config/nvim; nvim</code></pre>
<h2 data-number="8.2" id="42-navigation-and-listing">4.2 Navigation and
Listing</h2>
<pre><code>l ls
lS lss (sort by size)
lsR lsr (sort by time, oldest first)
lX lx (sort by extension)
lT lt (tree, depth 2)
lsT lstree (full recursive tree)
lzd ld (lazydocker)
cdi zi (interactive zoxide picker)</code></pre>
<h2 data-number="8.3" id="43-git">4.3 Git</h2>
<pre><code>g git
lg lazygit
gitig / git-ignore gi (generate .gitignore)</code></pre>
<h2 data-number="8.4" id="44-terminal-windows-tabs-and-panes">4.4
Terminal Windows, Tabs, and Panes</h2>
<p>These abbreviations control the terminal emulator. Each has a Kitty
variant and a WezTerm variant; the correct one is inserted based on
$TERM or $TERM_PROGRAM.</p>
<pre><code>:w New OS window
:wv Split pane horizontally (new pane below)
:wh Split pane vertically (new pane to the right)
:wo Detach current window to its own OS window
:wot Move current pane to a new tab
:t New tab
:tl Set tab title
:tw Set window title
:twk Rename workspace (WezTerm only)
:tp Focus previous tab
:tn Focus next tab
:q Close current pane/window
:Q Close current tab
:sw spwin (spawn new OS window)</code></pre>
<p>Quick-navigate shortcuts open windows/tabs/panes with preset working
dirs:</p>
<pre><code>:tgk New tab at ~/.config/kitty
:tgn New tab at ~/.config/nvim
:tgf New tab at ~/.config/fish
:tgh New tab at ~
:tgcz New tab at chezmoi source dir
:tgcm New tab at chezmoi source dir
:tgp New tab at ~/projects
:tgr New tab at / (root)</code></pre>
<p>Prefixes :wg* and :wvg* / :whg* open OS windows or splits to the same
set of dirs, respectively.</p>
<p>Prefixes :cd* open tabs with a quick cd shortcut:</p>
<pre><code>:cdn cd ~/.config/nvim
:cdf cd ~/.config/fish
:cdh cd ~
:cdcz cd to chezmoi source
:cdp cd ~/projects</code></pre>
<p>Appending n to any :cd* abbreviation also runs nvim after changing
dir.</p>
<h2 data-number="8.5" id="45-chezmoi">4.5 Chezmoi</h2>
<pre><code>cm / cme / cmi / cmap / cmad / cmrm / cmcd /
cz / cze / czi / czap / czad / czrm / czcd
cm / cz chezmoi
cmcd / czcd chezmoi cd
cme / cze chezmoi edit
cmad / czad chezmoi add
cmap / czap chezmoi apply
cmrm / cmf / czrm / czf chezmoi forget
cmi / czi chezmoi init</code></pre>
<h2 data-number="8.6" id="46-docker">4.6 Docker</h2>
<pre><code>dcl docker context use default
dcls docker context ls
lzd ld (lazydocker)</code></pre>
<h2 data-number="8.7" id="47-systemctl">4.7 Systemctl</h2>
<pre><code>sc systemctl
ssc sudo systemctl
scu systemctl --user
st systemctl status
scs sudo systemctl start
scr sudo systemctl restart
ssct sudo systemctl start
sscs sudo systemctl stop
sscr sudo systemctl restart</code></pre>
<h2 data-number="8.8" id="48-ai-assistants">4.8 AI Assistants</h2>
<pre><code>ag antigravity
ag. antigravity .
v antigravity-ide
s wezterm ssh (WezTerm only)</code></pre>
<h2 data-number="8.9" id="49-history-expansion">4.9 History
Expansion</h2>
<p>These are implemented as keybinding helpers, but can also be
typed:</p>
<pre><code>!^ Expand to first argument of previous command
!* Expand to all arguments of previous command
typo_sub Interactive typo substitution (Ctrl+F)
bang_string !string expansion
bang_search !?string search
bang_minus_n !-n (nth-previous command)</code></pre>
<h2 data-number="8.10" id="410-miscellaneous">4.10 Miscellaneous</h2>
<pre><code>/exit exit
:q Close pane (alias for terminal close)
:Q Close tab
sudu sudo -s
kt kitty (Kitty only)
c cat
speedtest-fast fast-cli
bl bd list
bs bd sync
bC bd create --title
bsh bd show
lb lazybeads</code></pre>
<h2 data-number="8.11" id="411-shell-aliases">4.11 Shell Aliases</h2>
<p>These aliases are defined in conf.d/tricks.fish via alias (which
creates Fish functions). They are active in all interactive
sessions.</p>
<h3 data-number="8.11.1" id="navigation">Navigation</h3>
<pre><code>.. cd ..
... cd ../..
.... cd ../../..
..... cd ../../../..
...... cd ../../../../..</code></pre>
<h3 data-number="8.11.2" id="color-overrides">Color Overrides</h3>
<p>Force color output for common tools:</p>
<pre><code>grep grep --color=auto
fgrep fgrep --color=auto
egrep egrep --color=auto
dir dir --color=auto
vdir vdir --color=auto</code></pre>
<h3 data-number="8.11.3" id="safety-wrappers">Safety Wrappers</h3>
<p>Add -i (interactive confirmation) to destructive commands:</p>
<pre><code>cp cp -i
mv mv -i</code></pre>
<h3 data-number="8.11.4" id="archives-and-networking">Archives and
Networking</h3>
<pre><code>tarnow tar -acf Create compressed archive (auto-detects format)
untar tar -zxvf Extract a gzip-compressed archive
wget wget -c Resume interrupted downloads by default
tb nc termbin.com 9999 Pipe content to termbin.com for quick sharing</code></pre>
<h3 data-number="8.11.5" id="system-logs">System Logs</h3>
<pre><code>jctl journalctl -p 3 -xb Show priority-3 (error) journal entries
from the current boot</code></pre>
<hr />
</body>
</html>