Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Anyone familiar with auto-fu.zsh project?



Hello,
I've just implemented async feature without using zpty. From what I
saw zsh-autosuggestions uses zpty to look-up the suggestion. Maybe it
has some drawbacks and you would be interested in using <( ) instead
of zpty (it's probably still required to capture completions, though)?
It's similar to using zpty:

exec {PCFD}< <(-fast-highlight-check-path)
zle -F -w "$PCFD" fast-highlight-check-path-handler

-fast-highlight-check-path-handler() {
    if read -r -u "$PCFD" line; then
    ...
    fi
    zle -F ${PCFD}
    exec {PCFD}<&-
}

<( ) process is automatically disowned, I've used it in 2 projects and
it works without problems, very robust. The effect:

https://asciinema.org/a/V18uHIn2BR0OVfRsmxyqkVi7K

-- 
Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author