-
Notifications
You must be signed in to change notification settings - Fork 105
Prior Art
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 is another fzf plugin that provides similar search commands and is prevalent in the fish community (600+ stargazers and 30 contributors, including me). 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; see the list below for more details. 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
- faster, more efficient, code
- code that is easier to debug if you encounter issues
- 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)
- to search git status, git log, shell variables and processes using fzf
- previews for everything you're searching for
- to preview whatever you are searching for
- a tight integration with the command line to be able to pre-popualte the fzf query using the current token and replace it your selection
- timestamps when searching command history
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 optionally comes with its own Fish extension. It is substantial but fzf.fish has these advantages over it:
- commands for searching git status, git log, shell variables, and processes
- previews on everything you're searching for
- timestamps when searching command history
- colorized results when searching for files
- 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