Skip to content

Prior Art

Patrick Fong edited this page Nov 16, 2023 · 15 revisions

If fzf.fish is a useful plugin, it is by standing on the shoulder of giants. This Wiki page explains how fzf.fish compares to and improves on two antecedent fzf integrations for Fish.

Jethrokuan/fzf

jethrokuan/fzf is another fzf plugin that provides similar search commands and is prevalent in the fish community. In fact, I referenced it frequently while developing this plugin—thank you Jethro!

So why another fzf plugin? While contributing to jethrokuan/fzf, I was discouraged by the complexity and inefficiency of the code that resulted from feature cruft (e.g. the search commands provide redundant, overlapping ways to action on files: find, cd, and open, when the user could simply decide the action themselves via the command line) and poor design decisions (e.g. Tmux support was implemented using a variable command when it could have been more easily done with a function). Moreover, the plugin hadn't received a major update in over a year (Jethro later confirmed to me that he stopped using fish). Wanting a sharper, actively improving tool and to give back to the community, I decided to write my own.

The result was a plugin that implements most of the same search commands but is faster, easier to maintain, and more Unix-y. Since porting over the main search commands, I've continued to iterate on the plugin, upgrading the existing commands and adding completely new ones. Additionally, I invested generously into documentation and even set up continuous integration, making fzf.fish much easier to contribute to. However, I chose not to implement Tmux support directly, because users can easily add support externally themselves (see Cookbook); and tab completion, because even jethrokuan/fzf's implementation of it is buggy as evidenced by the many issues reported about it.

TLDR: choose fzf.fish over jethrokuan/fzf if you want

  • way more features
  • better documentation
  • a tool built on Unix philosophy
  • a plugin that is more likely to attract contributors because it is more maintainable and has CI
  • a plugin that will be more frequently updated by its author (Jethro no longer uses fish)

and you don't mind

  • having to integrate fzf with Tmux yourself, which is easy to do (see Cookbook)
  • not having buggy fzf tab completion

Fzf's out-of-the-box Fish extension

Fzf optionally comes with its own Fish extension. It is substantial but fzf.fish has these advantages over it:

  • way more features
  • previews for whatever you are searching for
  • configurable key bindings
  • autoloaded functions for faster shell startup
  • easier to read, maintain, and contribute to
  • better maintained