chrisant996 / clink-fzf

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

Small imprecision in the doc about "**<TAB>" enabling #9

Closed Gilles-Maisonneuve closed 6 months ago

Gilles-Maisonneuve commented 6 months ago

Not an issue in the code, but rather a small imprecision in the documentation.

The wording of the How to Install / 2. Either put ... might be a little bit confusing:

While it is true that placing the FZF.EXE file in a folder of the PATH is enough to use the fsf tool as a command or a pipe filter, the "clink set fzf.exe_location <put_dir_name_here> " is MANDATORY if one wants to be able to use the "**<TAB>" functionality.

chrisant996 commented 6 months ago

While it is true that placing the FZF.EXE file in a folder of the PATH is enough to use the fsf tool as a command or a pipe filter, the "clink set fzf.exe_location <put_dir_name_here> " is MANDATORY if one wants to be able to use the "**<TAB>" functionality.

Can you share more information? I think there might be something else going on.

I don't have fzf.exe_location set, and fzf.exe is in my PATH, and the **Tab functionality is working fine on my computer.

I believe you that it's not working on your computer. At the same time, it doesn't look like the problem is in the fzf.lua script, at least not with the information available so far.

❯ where fzf
c:\wbin\fzf.exe
❯ clink set fzf.exe_location
        Name: fzf.exe_location
 Description: Location of fzf.exe if not on the PATH
        Value:
 wbin\clink  tools ±1                                                                            Fri 02:26 AM
❯ echo **
  C:\wbin\clink\.luacheckrc
  C:\wbin\clink\.inputrc
  C:\wbin\clink\.init.lua
  C:\wbin\clink\.commonrc
  C:\wbin\clink\.bootstrap_bundle.lua
  C:\wbin\clink\!testscripts.lua
  C:\wbin\clink\!init.lua
  C:\wbin\clink\!init-gizmos.lua
  C:\wbin\clink\!ignore_history.lua
> C:\wbin\clink\!foldline.lua                                                                                         │
  264/264 ────────────────────────────────────────────────────────────────────────────────────────────────────────────
>                                           
plutonium-239 commented 6 months ago

It seems it's not working for me either, I just installed fzf + fzf.lua and restarted clink but:

> echo **
**

Moreover, I have set fzf.location

chrisant996 commented 6 months ago

It seems it's not working for me either, I just installed fzf + fzf.lua and restarted clink but:

> echo **
**

Moreover, I have set fzf.location

Please share the output from clink set fzf* and your .inputrc file.

What key did you press after the **?

Also, how did you install fzf? Scoop? Winget? Manually download from the fzf repo and extracting from the zip file to a directory?

plutonium-239 commented 6 months ago

Please share the output from clink set fzf* and your .inputrc file.

fzf.default_bindings  False
fzf.exe_location      D:\env\fzf.exe
fzf.height            40%

What key did you press after the **?

I tried both Tab and Enter My understanding is, it should bring up the fzf interface on Tab right? For me that just cycles through files in the normal way (i.e. on the same line without the fzf interface).

Also, how did you install fzf? Scoop? Winget? Manually download from the fzf repo and extracting from the zip file to a directory?

Manually, and it is also in my PATH

chrisant996 commented 6 months ago
fzf.default_bindings  False

Oh, I see the problem. 😬

You haven't turned on the default key bindings.

And that would be because the Readme doesn't mention that as a required step. Because the Readme wasn't updated when the default changed from "True" to "False" (because just because fzf.lua exists doesn't automatically imply the user wants to have fzf replace their key bindings, especially if they have fzf.lua because they've installed clink-gizmos).

The instructions at the top of the fzf.lua file were updated, but not the instructions in the Readme.

plutonium-239 commented 6 months ago

I see, it works now. Thanks!

Gilles-Maisonneuve commented 4 months ago

Hello, Sorry for being so late to answer.

I am not able to reproduce the limitation nowadays, since I have updated clink many times, my Windows Terminal too as well as my Win10... Nowadays clink "**" completion works smoothly as you documented:

C:\Users\g...\bat_cmd> clink set fzf.exe_location clear Setting 'fzf.exe_location' reset to ''C:\Users\g...\bat_cmd>clink set fzf* fzf.default_bindings True fzf.exe_location fzf.height 40%C:\Users\g...cmd>echo **

C:\Users\g...cmd\Batch.256.ico C:\Users\g...cmd\Bat2Exe C:\Users\g...cmd\ARRAY-emulation.cmd C:\Users\g...cmd\arguments_with_quotes.cmd C:\Users\g...cmd\AnsiColors16t.txt C:\Users\g...cmd\AnsiColors16t.cmd C:\Users\g...cmd\ANSI-ESC_sequencestest.cmd C:\Users\g...cmd\aliases.old.cmd C:\Users\g...cmd\aliases_.cmd C:\Users\g...cmd\aliases.txt C:\Users\g...cmd\alias.cmd C:\Users\g...cmd\7z.cmd C:\Users\g...cmd\37667.bc.bat C:\Users\g...cmd.profile.doskey

C:\Users\g...cmd.profile.cmd │ 611/611 ──...──────────────────────────────────────────────>

Sorry for the inconvenience, obviously this was due to some kind of flaw / misconfiguration somewhere in my Console / shell environment.

NB: tested under Windows Terminal and regular W10 console and ConEmu, all three work.

Thank you for your kind answer.

Gilles

Beaucourt for ever!

Sent with Proton Mail secure email.

On Monday, March 4th, 2024 at 11:35 PM, Samarth Bhatia @.***> wrote:

Please share the output from clink set fzf* and your .inputrc file.

fzf.default_bindings False fzf.exe_location D:\env\fzf.exe fzf.height 40%

What key did you press after the **?

I tried both Tab and Enter My understanding is, it should bring up the fzf interface on Tab right? For me that just cycles through files in the normal way (i.e. on the same line without the fzf interface).

Also, how did you install fzf? Scoop? Winget? Manually download from the fzf repo and extracting from the zip file to a directory?

Manually, and it is also in my PATH

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>