Daniel Wayne Armstrong<p>For sharing a common Fish shell configuration between multiple operating systems, the `switch` command is useful.</p><p>Using `switch` I can execute different blocks of code depending on the OS reported by `uname`.</p><p>Example:</p><p>```<br>switch (uname)<br>case FreeBSD<br> abbr -a l ls -aFhl --color=always<br>case NetBSD<br> abbr -a l colorls -aFGl<br>end<br>```</p><p>See: <a href="https://fishshell.com/docs/current/cmds/switch.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">fishshell.com/docs/current/cmd</span><span class="invisible">s/switch.html</span></a></p><p><a href="https://fosstodon.org/tags/FishShell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FishShell</span></a> <a href="https://fosstodon.org/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a> <a href="https://fosstodon.org/tags/NetBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NetBSD</span></a></p>