rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

Support FZF #256

Closed jhrmnn closed 8 years ago

jhrmnn commented 8 years ago

It seems that fzf#run from FZF does not work in Neovim.app. Running

:call fzf#run({'source': 'ls'})

results in

Error running ls|fzf > /var/folders/[...]

Versions:

emptyflask commented 8 years ago

Works for me using:

jhrmnn commented 8 years ago

I've updated everything, but the issue persists.

I don't use the fzf.vim plugin though. As far as I understand, it is only a collection of functions using the core fzf#run?

I'm on El Capitan. The problem is not related to $PATH.

How can I debug this further?

emptyflask commented 8 years ago

I'm running Yosemite, not sure if that makes a difference.

bambu commented 8 years ago

@azag0, I am also able to run this on El Capitan. Never used FZF, don't know what it does but copy pasting it worked. did you modify the output that you typed? when i entered your command I got a popup with the current directory and the status bar said:

term://.//66312:ls|/path/to/my/vim/plugged/fzf/bin/fzf > /var/folders/2y/rest/of/nvim/file

If you are just getting fzf then maybe the plugin is somehow failing to find the fzf binary.

These are just some of the things that I would double check when troubleshooting any plugin that use the terminal

jhrmnn commented 8 years ago

Ok, I think I tracked this down, quite a corner case bug. The issue is this line of code. It assumes there are no = characters in environment variables. In my case, I have

FZF_DEFAULT_OPTS=--bind=ctrl-u:page-up,ctrl-d:page-down

So in Neovim.app, that ends up equal to --bind, which triggers the error. Don't know Objective-C, so cannot provide a patch.

bambu commented 8 years ago

@azag0 checkout #260 and see if it works for you