-
Notifications
You must be signed in to change notification settings - Fork 66
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
TAB completion with directory names containing spaces #122
Comments
This seems to only happen with the preview pane on... so the culprit is somewhere with this fzf/functions/__fzf_complete.fish Line 126 in 91efdf7
|
I'm having the same problem. In addition, while the preview pane doesn't actually show the parts of the directory name after the space, when you select a directory from it the whole directory including the space and whatever is after the space does get substituted into the command. However, the space is not escaped with a backslash and therefore the substituted directory is incorrect. |
@jethrokuan Mind explaining what the |
Sorry for not getting back, have been pretty busy. I'm not familiar with this portion of the code itself, maybe @vic (who wrote these completion widgets) can help us out better? |
I just ended up losing a bit of work due to this issue. I'm not using the preview pane at all. ( I had both a -> rm -rfv Cali<TAB>
...
-> rm -rfv Calibre Library
removed directory 'Library/' I feel like the expected behaviour is for each line passed to |
Signed-off-by: reisub0 <[email protected]>
@reisub0 it's unfortunate that you've lost work because of that. I looked into this again, and am brought back to fish-shell/fish-shell#3469. The crux of the issue is that for this completion widget to function correctly, the result of
I could parse each line, separate by tab, and escape the first item, but what about completions that may have tabs within them, e.g. file descriptors with tab characters? I'm hoping this is fixed upstream, but I'll add a caveat in the wiki page. |
@jethrokuan for myself, I solved the problem as follows (It works fine for daily work): |
@jethrokuan it seems like fish-shell/fish-shell#3469 has been fixed and merged! (via fish-shell/fish-shell#8645) |
@Koljasha your workaround works great for me! Thanks for finding the spot. 🙂 To the group, would that approach work to outright resolve this issue? Or are there limitations it imposes that I'm not aware of? Seems like "escape fzf's completions" is basically exactly what's called for here. 🤔 |
Just moving over from zsh to fish and this is probably the last issue I have. The workaround provided by @Koljasha fixes the tab complete for me. Preview is still borked with spaces. But, it seems that |
Using TAB completion with directories containing spaces in their names appears to be broken (?). I attach two screenshots with and without FZF_COMPLETE to illustrate the issue.
Without FZF TAB completion :
With TAB completion, notice the missing part of the directory name :
The text was updated successfully, but these errors were encountered: