gazorby / fifc

🐠 Configurable fzf completions for fish shell
MIT License
157 stars 11 forks source link

WIP: setup fifc only on an interactive shell #12

Closed hbiel closed 2 years ago

hbiel commented 2 years ago

Hey @gazorby,

thanks for your work on this plugin. I've been toying around with it for the last few days and am liking it so far!

I had one issue where it interferes with my neovim configuration though in an unexpected way. I'm using neo-tree.nvim which launches commands in a subshell to identify git directories. Instead of getting a result it seemed to be stuck in a loop and retrying indefinately.

I tracked it down to the fifc command, specifically this block of variable setup: https://github.com/gazorby/fifc/blob/main/functions/fifc.fish#L39-L48

These changes are just a quick workaround for myself. But as tab completion is an interactive feature in itself it might make sense nonetheless. :-)

Best regards!

hbiel commented 2 years ago

I just noticed that this causes problems in the preview functions so I have marked it as work in progress. Maybe you've got some ideas about this.

hbiel commented 2 years ago

Nevermind! I found the culprit.

The issue was that the nvim plugin was listening to filesystem changes. I was editing my fish configuration files and your plugin triggered changes to the fish variables which then triggered the nvim plugin to rescan the directory. And so on.

To fix this I have added an exception for the fish directory in my nvim configuration for now. But it's definitely not a problem of your plugin.

gazorby commented 2 years ago

Hi @hbiel

Thank you for using fifc!

Actually, I think that we can't make the plugin work in interactive-only shells as fzf preview/keybinding commands spawn new fish instances using fish -c which start a non-interactive shell.