Skip to content
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

New CTRL-T behaviour #250

Open
ManuelAF opened this issue Feb 9, 2024 · 7 comments
Open

New CTRL-T behaviour #250

ManuelAF opened this issue Feb 9, 2024 · 7 comments

Comments

@ManuelAF
Copy link

ManuelAF commented Feb 9, 2024

Till version 2.5.22 using ctrl-t the relative path of the selection was sent to the command line, now with the version 2.5.22 the full path (c:\users...) is sent, is there any way to change it ?

@cprusprus
Copy link

I can only reproduce this when Set-PsFzfOption -EnableFd is enabled. I'll do like c:\temp ctrl-t and with that option enabled I end up with c;\tempc:\temp\test.txt. Without the option enabled I get c:\temp\test.txt as expected. I believe it likely has to do with an alias conflict for this script and the winget sharkdp.fd package, which puts fd.exe in the path, used by neovim telescope plugin.

@ManuelAF
Copy link
Author

The only change is upgrading from 2.5.19 to 2.5.22, till this update I do someting like
notepad ctrl-t (and select a file)
an the path added to the command line is relative, now with the 2.5.22 update, is a full path, but if you do
notepad .ctrl-t(and select a file)
even with the 2.5.22 version you get a relative path

@cprusprus
Copy link

I see what you mean yeah, I get full paths too if I precede with an application like notepad.

@ManuelAF
Copy link
Author

@cprusprus
Copy link

Why was it even touching the pre-existing path fragment the user had on the command line before invoking PSFzf? That seems like the wrong algorithm. That portion of the CL should be read-only, Ideally, PSFzf takes it in as a parameter and adjusts results based on it.

IOW that change didn't fix the underlying issue with #236, it simply changed to use full paths as output.

Is there a reason this regression breaks existing workflows (relative vs absolute paths)?

@owenstake
Copy link

Use fdfind to get the relative path of file.

$env:FZF_CTRL_T_COMMAND="fd --color always"

@ManuelAF
Copy link
Author

ManuelAF commented Mar 8, 2024

I'm already using it

$env:FZF_CTRL_T_COMMAND='fd --hidden --follow --exclude .git --exclude node_modules --exclude .vs --exclude .vscode'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants