-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Escape and complete -C (for fzf completion widget) #3469
Comments
Yes, can reproduce. We have a bunch of issues with escaping (because it's really confusing), but I can't find this particular one. |
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! |
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 |
For
That is, expand the completed token. This may be worthwile, assuming that completions are short-lived.
I have an implementation of this one at escape-complete-C. |
@krobelus Could this be fixed by taking the implementation in your branch, but gating it behind a I will open a PR for this. |
An example use case is an external completion pager: bind \cg "commandline -rt (complete -C --escape|fzf|cut -d\t -f1)\ " Fixes fish-shell#3469
An example use case is an external completion pager: bind \cg "commandline -rt (complete -C --escape|fzf|cut -d\t -f1)\ " Fixes #3469
fish 2.3.1, Arch Linux, urxvt 9.22
I am trying to write a widget to replace fish completion menu with fzf. (Awesome, right? ;) )
The idea is simple:
Problem is,
complete -C
unescapes the tokens a bit too much, which makes variables indistinguishable from escaped dollars.Example:
Replace
<binding>
with a binding to a function that prints outcomplete -C
. Result:The result is unusable since there is no way for the calling function to know what should be escaped.
The normal completion does preserve the escaped token though:
I think
complete -C
should do the same.This might be related to #1127.
The text was updated successfully, but these errors were encountered: