openbsd-webzine/issues/issue-6/50_TIPS.html

16 lines
870 B
HTML

<article id="tips">
<div class="puffies" aria-hidden="true">🐡🐡🐡</div>
<h2>Shell tips</h2>
<p>
Did you know your shell has keyboard shortcuts? They are quite useful. Here is a list for the default mode ("emacs mode"):
<ul>
<li><code>ctrl+r</code>: search in history</li>
<li><code>ctrl+a</code> and <code>ctrl+e</code> : move cursor to beginning or end of the line</li>
<li><code>alt+d</code> and <code>alt+backspace</code> : delete the word before or after the cursor</li>
<li><code>ctrl+k</code> and <code>ctrl+u</code> : delete the text before or after the cursor (except in ksh for which <code>ctrl+u</code> delete the entire line)</li>
<li><code>ctrl+y</code>: paste the last deleted text</li>
</ul>
The shell can also be used in vi mode, but this I'll save for another webzine issue.
</p>
</article>