chrisant996 / clink-fzf

Fzf integration for Clink
MIT License
77 stars 10 forks source link

luafunc:fzf_file display files and folders #21

Closed ArkadiuszMichalski closed 2 months ago

ArkadiuszMichalski commented 2 months ago

What is the expected behavior of this function? Should it display only files or files and folders? Right now it doing second thing. When combined with Bat I always getting an error for folders.

image

chrisant996 commented 2 months ago

Files and folders. The bash/etc integrations from the fzf repo itself show both.

You can of course configure the env vars to make it behave differently.

E.g. see FZF_CTRL_T_COMMAND and etc, both in the clink-fzf readme, and in the fzf repo documentation.

Of course, remember that CMD is not bash/zsh/Linux/etc. You can't use Linux/etc commands in the env var on Windows; you have to use Windows commands.

E.g. dir /s /b /a:-s-h lists only files.

Configure it your liking.

ArkadiuszMichalski commented 2 months ago

No problem, the function name/option and descriptions suggest that there should be only files. But if this is the default behavior in the original itself, there is no point to changing it.

E.g. dir /s /b /a:-s-h lists only files.

This still shows the folders, we need to add -d: dir /s /b /a:-s-h-d