-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require("fzf-commands").files() ... stops on ... --line-range=:$(($FZF_PREVIEW_LINES #6
Comments
It doesn't look like your bash is interpreting the inline math operators... Not sure why. Is this bash emulation or the real bash itself? |
on Pwsh ... |
Interesting... What does this output?
|
On bash... 48 |
Just pushed a commit, it's possible that the preview command wasn't being run by bash. Perhaps it isn't the default shell. Could you try it now? |
on windows and nvim nightly
and only this command ...
preview pops up in a blink and says
|
That's pretty odd, it looks like local fzf = require('fzf')
coroutine.wrap(function() print(fzf.fzf({"1", "2", "3"}, "--preview 'bash -c \"echo testing\"'")) end)() |
the ZFZ_window pops up, I can read ...
and there is output
don't know if this helps...
and when I call ...
I get the window and all works but when I toggle the preview to see it, I get ...
The plot thickens... |
I think this is conflating fzf's default vim support with |
Yes, I know. It was just some extra information. The original command still gives the same problem. unknown option -c |
Got it. I think this should help diagnose the problem. Can you post what is being displayed in the preview window? local fzf = require('fzf')
coroutine.wrap(function() print(fzf.fzf({"1", "2", "3"}, "--preview 'bash --version'")) end)() |
I have the same problem loading the lua snippet above gives: unknown option --version |
It's not clear to me why the subshell that fzf spawns to execute the preview command does not execute |
By the way is there a reason to use Bash at all? The preview in Telescope and bqf seems to be neovim native. The bqf code in particular looks simple enough. |
|
On Sat, Jan 7, 2023, 09:21 Vijay Marupudi ***@***.***> wrote:
fzf launches a shell for the preview,
But this is for compatibility with vim. In neovim there are native methods
to get preview. I don't know exactly how, but telescope and bqf launch
native preview. This has advantage of TS based highlighting, speed etc.
… —
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQGIZQVBHJUWDYGG4G3N7TWRGCXRANCNFSM6AAAAAASD2BHG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
That's not for compatibility with In the case of this, we're using an external command, |
that makes sense.
…On Mon, Jan 9, 2023, 09:58 Vijay Marupudi ***@***.***> wrote:
That's not for compatibility with vim, that's just what fzf does with the
--preview argument. You can use nvim for previewing items with nvim-fzf,
but that involves running a new neovim instance that communicates with the
main instance using the shell command and a named pipe. Either way, there's
not getting away from shell commands.
In the case of this, we're using an external command, bat. Shell commands
are the way to get fzf to preview using an external command.
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQGIZT5R2RZXM5E3MJKJDDWRQYRFANCNFSM6AAAAAASD2BHG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm on windows 11.
got a keymap
vim.keymap.set('n','<leader>xx',function () require("fzf-commands").files() end)
when I run it the floating window pops up and leaves in a blink.
the message at the topline reads ...
unknown option--line-range=:$(($FZF_PREVIEW_LINES
Bash and bat are on the system ...
Any ideas ?
thx
The text was updated successfully, but these errors were encountered: