1<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<meta name="color-scheme" content="light dark">
7<title>docs/guide.md · files · example.test</title>
8<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
9<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0c0c0c">
10<meta name="apple-mobile-web-app-title" content="ermite">
11<link rel="icon" type="image/svg+xml" href="/-/static/img/icon.HASH.svg">
12<link rel="apple-touch-icon" href="/-/static/app/apple-touch-icon.HASH.png">
13<link rel="manifest" href="/-/static/app/manifest.HASH.webmanifest">
14<link rel="preload" href="/-/static/fonts/atkinson-next.HASH.woff2" as="font" type="font/woff2" crossorigin>
15<link rel="stylesheet" href="/-/static/css/ermite.HASH.css">
16<meta name="htmx-config" content='{"history":false,"includeIndicatorCSS":false,"extensions":"sse, hx-live"}'>
17<script src="/-/static/js/htmx.min.HASH.js" defer>
18</script>
19<script src="/-/static/js/hx-live.min.HASH.js" defer>
20</script>
21<script src="/-/static/js/hx-sse.min.HASH.js" defer>
22</script>
23<script src="/-/static/js/ermite.HASH.js" defer>
24</script>
25<script src="/-/static/js/files.HASH.js" defer>
26</script>
27<script src="/-/static/js/passkey.HASH.js" defer>
28</script>
29<script src="/-/static/js/log.HASH.js" defer>
30</script>
31</head>
32<body data-ref="main" data-sha="SHA40" data-sel="" data-nav="" data-paths="/files/paths/SHA40" data-blob="/files/blob/main">
33<a class="skip" href="#main">skip to content</a>
34<header class="hdr">
35<div class="hdr-top">
36<a class="brand" href="/" data-g="h" aria-label="home" title="home (g h)">
37<span class="brand-mark" aria-hidden="true">
38</span>
39</a>
40<nav class="crumbs" aria-label="Path">
41<ol>
42<li>
43<a href="/files">files</a>
44</li>
45<li>
46<a href="/files/tree/main">blob</a>
47</li>
48<li>
49<a href="/files/tree/main">main</a>
50</li>
51<li>
52<a href="/files/tree/main/docs">docs</a>
53</li>
54<li>
55<a href="/files/blob/main/docs/guide.md" aria-current="page">guide.md</a>
56</li>
57</ol>
58</nav>
59<div class="hdr-acts">
60<a class="btn ref" href="/files/refs" data-fire="refs" aria-keyshortcuts="b" title="switch branch or tag (b)">
61<span class="ico i-branch" aria-hidden="true">
62</span>
63<span class="ref-name">main</span>
64<span class="sha">SHA7</span>
65</a>
66<button type="button" class="btn search" data-js aria-haspopup="dialog" aria-controls="panel-cmd" aria-keyshortcuts="Control+K :" title="go to a section, ref, file or repo (ctrl k or :)" data-fire="cmd">
67<span class="ico i-search" aria-hidden="true">
68</span>
69<span class="search-label">Go to…</span>
70<kbd aria-hidden="true">ctrl k</kbd>
71</button>
72</div>
73</div>
74<nav class="tabs" aria-label="Sections">
75<ul>
76<li>
77<a href="/files" data-key="s" aria-keyshortcuts="s">Summary <kbd aria-hidden="true">s</kbd>
78</a>
79</li>
80<li>
81<a href="/files/tree/main" data-key="t" aria-keyshortcuts="t" aria-current="page">Files <kbd aria-hidden="true">t</kbd>
82</a>
83</li>
84<li>
85<a href="/files/commits/main" data-key="c" aria-keyshortcuts="c">Commits <kbd aria-hidden="true">c</kbd>
86</a>
87</li>
88<li>
89<a href="/files/refs" data-key="r" aria-keyshortcuts="r">Branches & tags <kbd aria-hidden="true">r</kbd>
90</a>
91</li>
92<li>
93<a href="/files/merge-requests" data-key="m" aria-keyshortcuts="m">Merge requests <kbd aria-hidden="true">m</kbd>
94</a>
95</li>
96<li>
97<a href="/files/actions" data-key="a" aria-keyshortcuts="a">Actions <kbd aria-hidden="true">a</kbd>
98</a>
99</li>
100</ul>
101</nav>
102</header>
103<div class="work has-rail">
104<main id="main" tabindex="-1">
105<h1 class="file-h">
106<span>guide.md</span>
107<span class="acts">
108<a class="btn" href="/files/raw/main/docs/guide.md">Raw</a>
109<a class="btn" href="/files/commits/main/docs/guide.md">History</a>
110<a class="btn" href="/files/tree/main/docs">Folder</a>
111</span>
112</h1>
113<article class="prose" aria-label="guide.md" hx-ignore>
114<h1 id="md-guide">Guide</h1>
115<h2 id="md-steps">Steps</h2>
116<p>Run it.</p>
117<pre>
118<code class="language-sh">make all
119</code>
120</pre>
121</article>
122<details class="source">
123<summary>source</summary>
124<pre class="chroma code" data-anchor="" hx-on:click="let a = event.target.closest('a.ln'); if (!a) return; event.preventDefault();
125 let n = +a.textContent; if (!event.shiftKey || !data.anchor) data.anchor = n;
126 let lo = Math.min(+data.anchor, n), hi = Math.max(+data.anchor, n);
127 history.replaceState(null, '', '#L' + lo + (hi > lo ? '-L' + hi : '')); trigger('sel')" hx-on:sel="let m = location.hash.match(/^#L(\d+)(?:-L(\d+))?$/); let lo = m ? +m[1] : 0, hi = m ? +(m[2] || m[1]) : 0;
128 q('.line in this').arr().forEach(l => { let k = +l.id.slice(1); l.classList.toggle('sel', k >= lo && k <= hi) });
129 document.body.dataset.sel = lo ? 'L' + lo + (hi > lo ? '-L' + hi + ' · ' + (hi - lo + 1) + ' lines' : '') : '';
130 if (lo && event.detail?.scroll) document.getElementById('L' + lo)?.scrollIntoView({ block: 'center' })" hx-live="if (!data.ready) { data.ready = '1'; trigger('sel', { scroll: true }) }" data-ready="">
131<code hx-ignore>
132<span class="line" id="L1">
133<a class="ln" href="#L1">1</a>
134<span class="gh"># Guide</span>
135</span>
136<span class="line" id="L2">
137<a class="ln" href="#L2">2</a>
138</span>
139<span class="line" id="L3">
140<a class="ln" href="#L3">3</a>
141<span class="gu">## Steps</span>
142</span>
143<span class="line" id="L4">
144<a class="ln" href="#L4">4</a>
145</span>
146<span class="line" id="L5">
147<a class="ln" href="#L5">5</a>Run it.</span>
148<span class="line" id="L6">
149<a class="ln" href="#L6">6</a>
150</span>
151<span class="line" id="L7">
152<a class="ln" href="#L7">7</a>
153<span class="s">```sh</span>
154</span>
155<span class="line" id="L8">
156<a class="ln" href="#L8">8</a>make all</span>
157<span class="line" id="L9">
158<a class="ln" href="#L9">9</a>
159<span class="s">```</span>
160</span>
161</code>
162</pre>
163</details>
164</main>
165<aside class="rail" aria-label="Context">
166<section aria-labelledby="r-file">
167<h2 id="r-file">File</h2>
168<dl class="kv">
169<dt>size</dt>
170<dd>47 B</dd>
171<dt>lines</dt>
172<dd>9</dd>
173<dt>type</dt>
174<dd>markdown</dd>
175</dl>
176</section>
177<section aria-labelledby="r-last">
178<h2 id="r-last">Last change <a href="/files/commits/main/docs/guide.md">History</a>
179</h2>
180<p>
181<a href="/files/commit/SHA40">SHA7</a> add docs/guide.md</p>
182<p class="dim">T · <time datetime="STAMP" title="STAMP">AGO</time>
183</p>
184</section>
185<section aria-labelledby="r-outline">
186<h2 id="r-outline">On this page</h2>
187<nav class="outline" aria-label="Outline">
188<a class="l1" href="#md-guide">Guide</a>
189<a class="l2" href="#md-steps">Steps</a>
190</nav>
191</section>
192<section aria-labelledby="r-sel">
193<h2 id="r-sel">Selection</h2>
194<p :text="document.body.dataset.sel || 'none · click a line number, shift-click extends'">none · click a line number, shift-click extends</p>
195<p class="dim">y copies a permalink pinned to the commit sha</p>
196</section>
197</aside>
198</div>
199<footer class="foot">
200<span>ermite devel</span>
201<a href="http://example.test/ermite" rel="noopener" title="source of this version (AGPL-3.0-or-later)">source</a>
202<button type="button" class="foot-keys" data-js data-fire="help" aria-haspopup="dialog" aria-controls="panel-help" aria-keyshortcuts="?">
203<kbd aria-hidden="true">?</kbd> keyboard shortcuts</button>
204</footer>
205<div class="hint" role="status" aria-live="polite">
206<span class="hint-nav" :text="document.body.dataset.nav || ''">
207</span>
208<span class="hint-sel" :text="document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''">
209</span>
210<span class="hint-flash" :text="document.body.dataset.flash || ''">
211</span>
212</div>
213<dialog id="panel-help" class="panel modal" aria-label="Keyboard shortcuts" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
214<div class="panel-head">
215<h2>Keyboard shortcuts</h2>
216<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
217<kbd>esc</kbd> close</button>
218</div>
219<div class="keys-pref">
220<label>
221<input type="checkbox" id="keys-off" aria-describedby="keys-note" hx-on:change="ermite.setKeysOff(this.checked)"> Turn off single-key shortcuts</label>
222<p id="keys-note" class="dim">Single-key shortcuts are on. ctrl k and esc work whatever this says.</p>
223</div>
224<dl class="keys">
225<div>
226<dt>
227<kbd>ctrl k</kbd>
228<kbd>:</kbd>
229</dt>
230<dd>go to a section, branch, tag, file or repository</dd>
231</div>
232<div>
233<dt>
234<kbd>?</kbd>
235</dt>
236<dd>this list</dd>
237</div>
238<div>
239<dt>
240<kbd>j</kbd>
241<kbd>k</kbd>
242</dt>
243<dd>move the row cursor down / up</dd>
244</div>
245<div>
246<dt>
247<kbd>enter</kbd>
248</dt>
249<dd>open the row under the cursor; on Files, a directory opens or closes in place</dd>
250</div>
251<div>
252<dt>
253<kbd>↑</kbd>
254<kbd>↓</kbd>
255<kbd>←</kbd>
256<kbd>→</kbd>
257<kbd>home</kbd>
258<kbd>end</kbd>
259</dt>
260<dd>in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file</dd>
261</div>
262<div>
263<dt>
264<kbd>l</kbd>
265<kbd>h</kbd>
266</dt>
267<dd>on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls</dd>
268</div>
269<div>
270<dt>
271<kbd>g g</kbd>
272<kbd>G</kbd>
273</dt>
274<dd>first / last row</dd>
275</div>
276<div>
277<dt>
278<kbd>/</kbd>
279</dt>
280<dd>filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)</dd>
281</div>
282<div>
283<dt>
284<kbd>b</kbd>
285</dt>
286<dd>switch branch or tag</dd>
287</div>
288<div>
289<dt>
290<kbd>s</kbd>
291<kbd>t</kbd>
292<kbd>c</kbd>
293<kbd>r</kbd>
294<kbd>m</kbd>
295</dt>
296<dd>tabs: summary, files, commits, branches & tags, merge requests</dd>
297</div>
298<div>
299<dt>
300<kbd>g h</kbd>
301</dt>
302<dd>home</dd>
303</div>
304<div>
305<dt>
306<kbd>y</kbd>
307</dt>
308<dd>copy a permalink pinned to the commit</dd>
309</div>
310<div>
311<dt>
312<kbd>d</kbd>
313<kbd>u</kbd>
314<kbd>x</kbd>
315</dt>
316<dd>diff: split / unified / collapse or expand all</dd>
317</div>
318<div>
319<dt>
320<kbd>e</kbd>
321<kbd>E</kbd>
322</dt>
323<dd>diff: the whole file in view / every file, with the lines the hunks hide</dd>
324</div>
325<div>
326<dt>
327<kbd>n</kbd>
328</dt>
329<dd>merge request: next note in the diff</dd>
330</div>
331<div>
332<dt>
333<kbd>esc</kbd>
334</dt>
335<dd>close a dialog, leave a field</dd>
336</div>
337</dl>
338</dialog>
339<dialog id="panel-refs" class="panel modal" aria-label="Switch ref" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
340<div class="panel-head">
341<label for="refs-filter" class="sr">filter branches and tags</label>
342<input id="refs-filter" type="search" placeholder="Switch branch or tag…" autocomplete="off" data-pick="#panel-refs li" hx-on:input="ermite.filter(this)">
343<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
344<kbd>esc</kbd>
345</button>
346</div>
347<div class="panel-cols" data-picklist>
348<section aria-label="Branches">
349<h2>Branches <span class="count">2</span>
350</h2>
351<ul>
352<li>
353<a href="/files/tree/feature/x">
354<span class="mark" aria-hidden="true"> </span>feature/x</a>
355</li>
356<li>
357<a href="/files/tree/main" aria-current="true">
358<span class="mark" aria-hidden="true">●</span>main</a>
359</li>
360</ul>
361</section>
362<section aria-label="Tags">
363<h2>Tags <span class="count">1</span>
364</h2>
365<ul>
366<li>
367<a href="/files/tree/v1.0">
368<span class="mark" aria-hidden="true"> </span>v1.0</a>
369</li>
370</ul>
371</section>
372</div>
373</dialog>
374<dialog id="panel-cmd" class="panel modal" aria-label="Go to" hx-on:close="ermiteFinder.paletteClose()" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
375<div class="panel-head">
376<label for="cmd-q" class="sr">go to</label>
377<input id="cmd-q" type="search" placeholder="Go to a section, branch, tag, file or repository…" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="cmd-list" aria-activedescendant="cmd-o0" hx-on:input="ermite.cmdFilter(this); ermiteFinder.palette(this)" hx-on:keydown="ermite.cmdKey(event)">
378<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
379<kbd>esc</kbd>
380</button>
381</div>
382<ul id="cmd-list" class="cmd-list" role="listbox" aria-label="Targets">
383<li id="cmd-o0" role="option" aria-selected="true" data-k="go home" data-cursor>
384<a href="/" tabindex="-1">
385<span class="lbl">home</span>
386<span class="k">go</span>
387</a>
388</li>
389<li id="cmd-o1" role="option" aria-selected="false" data-k="section summary">
390<a href="/files" tabindex="-1">
391<span class="lbl">summary</span>
392<span class="k">section</span>
393</a>
394</li>
395<li id="cmd-o2" role="option" aria-selected="false" data-k="section files">
396<a href="/files/tree/main" tabindex="-1">
397<span class="lbl">files</span>
398<span class="k">section</span>
399</a>
400</li>
401<li id="cmd-o3" role="option" aria-selected="false" data-k="section commits">
402<a href="/files/commits/main" tabindex="-1">
403<span class="lbl">commits</span>
404<span class="k">section</span>
405</a>
406</li>
407<li id="cmd-o4" role="option" aria-selected="false" data-k="section branches & tags">
408<a href="/files/refs" tabindex="-1">
409<span class="lbl">branches & tags</span>
410<span class="k">section</span>
411</a>
412</li>
413<li id="cmd-o5" role="option" aria-selected="false" data-k="section merge requests">
414<a href="/files/merge-requests" tabindex="-1">
415<span class="lbl">merge requests</span>
416<span class="k">section</span>
417</a>
418</li>
419<li id="cmd-o6" role="option" aria-selected="false" data-k="section actions">
420<a href="/files/actions" tabindex="-1">
421<span class="lbl">actions</span>
422<span class="k">section</span>
423</a>
424</li>
425<li id="cmd-o7" role="option" aria-selected="false" data-k="branch feature/x">
426<a href="/files/tree/feature/x" tabindex="-1">
427<span class="lbl">feature/x</span>
428<span class="k">branch</span>
429</a>
430</li>
431<li id="cmd-o8" role="option" aria-selected="false" data-k="branch main">
432<a href="/files/tree/main" tabindex="-1">
433<span class="lbl">main</span>
434<span class="k">branch</span>
435</a>
436</li>
437<li id="cmd-o9" role="option" aria-selected="false" data-k="tag v1.0">
438<a href="/files/tree/v1.0" tabindex="-1">
439<span class="lbl">v1.0</span>
440<span class="k">tag</span>
441</a>
442</li>
443<li id="cmd-o10" role="option" aria-selected="false" data-k="action turn single-key shortcuts on off keyboard">
444<a href="#" data-fire="keys" tabindex="-1">
445<span class="lbl">turn single-key shortcuts off</span>
446<span class="k">action</span>
447</a>
448</li>
449</ul>
450<p class="panel-foot">
451<span>
452<kbd>↑</kbd>
453<kbd>↓</kbd> move</span>
454<span>
455<kbd>enter</kbd> open</span>
456<span>
457<kbd>esc</kbd> close</span>
458</p>
459</dialog>
460<div id="keys" hidden hx-on="k-j from:body -> ermite.move(1);
461 k-k from:body -> ermite.move(-1);
462 k-top from:body -> ermite.edge(false);
463 k-bottom from:body -> ermite.edge(true);
464 k-open from:body -> ermite.open();
465 k-right from:body -> ermite.rail(true);
466 k-left from:body -> ermite.rail(false);
467 k-esc from:body -> ermite.closeDialogs();
468 k-help from:body -> ermite.dialog('panel-help');
469 k-refs from:body -> ermite.dialog('panel-refs', 'refs-filter');
470 k-cmd from:body -> ermite.dialog('panel-cmd', 'cmd-q'); ermiteFinder.load();
471 k-filter from:body -> ermite.focusFilter();
472 k-gh from:body -> ermite.go('.brand');
473 k-s from:body -> ermite.tab('s');
474 k-t from:body -> ermite.tab('t');
475 k-c from:body -> ermite.tab('c');
476 k-r from:body -> ermite.tab('r');
477 k-m from:body -> ermite.tab('m');
478 k-next from:body -> ermite.nextNote();
479 k-split from:body -> ermite.layout('split');
480 k-unified from:body -> ermite.layout('unified');
481 k-collapse from:body -> ermite.collapse();
482 k-expand from:body -> ermite.expandFile();
483 k-expandAll from:body -> ermite.expandAll();
484 k-permalink from:body -> ermite.permalink();
485 k-merge from:body -> window.ermiteMR?.openMerge();
486 k-read from:body -> window.ermiteMR?.markRead();
487 k-gf from:body -> window.ermiteMR?.focusFiles();
488 k-keys from:body -> ermite.toggleKeys()">
489</div>
490</body>
491</html>