You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Escape and complete -C (for fzf completion widget) #3469
I've been working on something like this with fzf for certain completions.
I put together the following function to use, but I see issues as well.
Not every time, but sometimes it will clear the entire command line (including prompt) from the view. Other times it will call fzf multiple times and try to do multiple completions. So far I haven't figured the issues or why they are only sporadic.
Correct me if I'm wrong, but I think you are referring to a different issue, namely process management and/or file descriptor management. fish has had several issues in that area in the past. You might want to keep looking in the issue tracker.
The issue from the original post related to the badly escaped output of the complete -C command.
For complete -C'\$HOME-$H', I can imagine two possible behaviors:
\$HOME-/home/johndoe
That is, expand the completed token. This may be worthwile, assuming that completions are short-lived.
\$HOME-$HOME
I have an implementation of this one at escape-complete-C.
This would break third party scripts using complete -C (mostly used for completing subcommands I guess).
@krobelus Could this be fixed by taking the implementation in your branch, but gating it behind a --unescaped flag as suggested in #4570 (comment) and discussed in #8441? This would avoid the problem of breaking scripts using complete -C, but allow the use case in this issue.
Activity
faho commentedon Oct 19, 2016
Yes, can reproduce.
We have a bunch of issues with escaping (because it's really confusing), but I can't find this particular one.
ViViDboarder commentedon Feb 2, 2018
I've been working on something like this with fzf for certain completions.
I put together the following function to use, but I see issues as well.
Not every time, but sometimes it will clear the entire command line (including prompt) from the view. Other times it will call fzf multiple times and try to do multiple completions. So far I haven't figured the issues or why they are only sporadic.
Interested to see if you've had any more luck!
Ambrevar commentedon Feb 2, 2018
Correct me if I'm wrong, but I think you are referring to a different issue, namely process management and/or file descriptor management. fish has had several issues in that area in the past. You might want to keep looking in the issue tracker.
The issue from the original post related to the badly escaped output of the
complete -Ccommand.Escape completions produced by complete -C
krobelus commentedon Oct 3, 2019
For
complete -C'\$HOME-$H', I can imagine two possible behaviors:\$HOME-/home/johndoeThat is, expand the completed token. This may be worthwile, assuming that completions are short-lived.
\$HOME-$HOMEI have an implementation of this one at escape-complete-C.
This would break third party scripts using
complete -C(mostly used for completing subcommands I guess).Add --unescaped option to `complete -C`
nzig commentedon Jan 15, 2022
@krobelus Could this be fixed by taking the implementation in your branch, but gating it behind a
--unescapedflag as suggested in #4570 (comment) and discussed in #8441? This would avoid the problem of breaking scripts usingcomplete -C, but allow the use case in this issue.I will open a PR for this.
Add --escape option to `complete -C`
Add --escape option to `complete -C`
Add --escape option to `complete -C`