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

14 lines
665 B
HTML

<article id="tips">
<div class="puffies" aria-hidden="true">🐡🐡🐡</div>
<h2>Shell tips</h2>
<p>
Enable "vi mode" in your ksh shell and embrace the feeling of vi shortcuts:
</p>
<pre>echo "set -o vi" >> $HOME/.kshrc</pre>
<p>In a new shell, you can navigate the history with <kbd>Esc</kbd> + <kbd>j</kbd> or <kbd>k</kbd></p>
<p>Move the cursor in a long command with <kbd>h</kbd> or <kbd>l</kbd></p>
<p>Search and filter the history with <kbd>Esc</kbd> + <kbd>/</kbd></p>
Vi lovers, see <a href="https://github.com/alols/xcape" class="permalink">xcape</a> to add <code>xcape -e 'Alt_L=Escape' &</code> to your "<code>$HOME/.xsession</code>" file.
</article>