jethrokuan / fzf

Ef-🐟-ient fish keybindings for fzf
MIT License
863 stars 65 forks source link

Advantages of using plain fzf #69

Closed PatrickF1 closed 6 years ago

PatrickF1 commented 6 years ago

Hi there, could someone explain to me the advantages of using this over plain fzf, no plugin, in fish, please? I understand that the keybindings change but I don't know the reasons for changing the keybindings and if there's other changes/advantages the plugin provides I do not know of. Thank you!

jethrokuan commented 6 years ago

Since you mention that there are keybinding changes, then I assume you are comparing using this repo to the fish extension provided within the official fzf repo here.

I believe I started this repo because that particular file wasn't working for me, and I'd had liked to manage fzf with fisherman anyway (my package manager doesn't install that file for me).

The main functional changes with this repo are that: (1) the functions are lazy-loaded, which means this doesn't affect your shell startup time at all, and (2) the keybindings change (and variable namings with it) to be more compatible with GNU readline, although there are still some clashes.

TL;DR: the difference is not much, but using this with fisherman is easier, and fish-related changes usually arrive here quicker.

PatrickF1 commented 6 years ago

Thanks for responding and creating the plugin Jethro!

I started this repo because that particular file wasn't working for me

Do you mean to say the file was buggy?

So the keybindings and variable names are optimized for people who use GNU readline? Not sure what you meant by (2)...

Btw, I think it would provide tremendous value to this plugin and give it way more users if you included a short readme about why to use this plugin over the integration provided officially and how they can't be used together.

jethrokuan commented 6 years ago

Do you mean to say the file was buggy?

yes, at some point in time it didn't work for me.

So the keybindings and variable names are optimized for people who use GNU readline?

The default (legacy) keybindings override some of the important fish keybindings. See https://github.com/fisherman/fzf/issues/22

It's also important to note that this repo diverged from the official repo a long time ago, and there has been some effort to add new functionality in, but feature parity was only a secondary goal. I will happily add more features if people request for them, but I've a happy user of this plugin for years, and have seen no need to change anything.

Btw, I think it would provide tremendous value to this plugin and give it way more users if you included a short readme about why to use this plugin over the integration provided officially and how they can't be used together.

It really isn't a convincing sell, but what you say makes sense. I'll add it in in a few hours.

PatrickF1 commented 6 years ago

Thank you for elaborating. Could you elaborate on the feature disparity between this plugin and the official plugin, please?

Re: adding a section. I think it's not about selling the plugin but about helping people understand what the context of the plugin and plainly lay out its features/changes. Otherwise people who are shopping around for fish plugins just won't use it if they don't actually know what it does and don't have time to compare the code (or they might not even have known there is an official fzf plugin). tl;dr Explain the relationship between this plugin, the official plugin, and using fzf plainly and people will be able to make the decision to whether or not to install it.

jethrokuan commented 6 years ago

Could you elaborate on the feature disparity between this plugin and the official plugin, please?

To be honest, I don't know, but I'm confident it isn't too huge. My role here is really just as a passive maintainer. I review any new functionality being added in, and help debug if people face issues.

If you're looking for something that grows with the fzf repo, you should install the one they provide, but i'm not sure how you'll receive updates. Again, there are users of this plugin who contribute new functionality, and that allows users of this plugin to get these new functionality with ease (assuming a fish plugin manager is used).

Otherwise people who are shopping around for fish plugins just won't use it if they don't actually know what it does and don't have time to compare the code (or they might not even have known there is an official fzf plugin)

I think the README already succinctly states what this plugin is for (efficient keybindings for the fzf utility), and I'm hesitant to write about something I'm not clear about (what functionality the official repo provides). All I can confidently talk about is why this repo exists and why people, including myself, use it.

BarbzYHOOL commented 6 years ago

all that talk was confusing

I don't know if I should try bare fzf or use this plugin but I will roll with the plugin since it's for fish and I have no idea what all of this is about :P

jethrokuan commented 6 years ago

@BarbzYHOOL I don't know what you mean by "bare fzf", but installing the fzf binary, and this plugin should get you up and running with no hassle.

PatrickF1 commented 6 years ago

I just read through https://github.com/junegunn/fzf/blob/master/shell/key-bindings.fish and the functions in fish and I realized a few more major things things this plugin supports whereas the official plugin does not

  1. very advanced fish tab completions
  2. cd into hidden directories
  3. open files using $EDITOR
  4. open files using open

I daresay this plugin is objectively superior and I think it's worth trying to at least link to this plugin from the fish-related docs in fzf.

jethrokuan commented 6 years ago

Thanks for going through this, I wasn't aware that the tab completion was not implemented in the official repo (someone PRed that in). Good to know :smile: