Skip to content
All writing

Switching to Fish, Part 3: Completions and the Tradeoff

Fish completions autoload from a folder with no plugin manager. Plus the one honest cost of switching: fish is not POSIX.

#articlesdev-toolsworkflowfish

Parts 1 and 2 covered typing less and scripting more. Part 3 is completions, plus the honest price of admission.

In bash, shipping a completion means sourcing a script from your .bashrc and hoping load order cooperates. In fish, drop a file named after your command into ~/.config/fish/completions/ and it loads automatically, only when that command is typed:

complete -c ws -f -a '(find ~/WWorkspace/projects -maxdepth 2 -mindepth 2 -type d -printf "%f\n" 2>/dev/null)'

Now ws <TAB> lists every project live from the filesystem. No registration step, no plugin manager, no stale hardcoded list.

The tradeoff: fish is not POSIX-compliant. Pasted bash snippets occasionally break (export FOO=bar fails, && chains sometimes need ; and). You will hit this a few times a year, mutter briefly, and move on.

Daily comfort with zero config versus a compatibility tax paid a few times a year. For a shell you sit in all day, that trade is not close. Start at part 1.

Get new posts by email

New writing in your inbox. Unsubscribe anytime.