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

~As-you-type completion in shell (but not everywhere?) #74

Open
bew opened this issue Oct 7, 2021 · 1 comment
Open

~As-you-type completion in shell (but not everywhere?) #74

bew opened this issue Oct 7, 2021 · 1 comment

Comments

@bew
Copy link
Owner

bew commented Oct 7, 2021

Existing plugin: https://github.com/marlonrichert/zsh-autocomplete
(note: nice plugin organization!)

BUT NOTE that it seems to come with its own completion engine, and its key bindings, and its own completion config (may be interesting to take some things!)...
I'd like to have like vim: C-n/p and M-hjkl, allow the use of TAB to enter the interactive completion system (the builtin from zsh).

To me, the ideal plugin should do only auto complete thing, not override everything, do its own config, come with its own widgets, ....


And "not everywhere", because some completion functions are expansive, I wouldn't want to have them auto-triggered when I don't need them (e.g: nix run pkgs#<TAB>)

@bew bew added for:shell kind:enhancement New feature or request labels Oct 7, 2021
@bew bew changed the title shell: as-you-type completion ~As-you-type completion in shell (but not everywhere?) Oct 7, 2021
@bew
Copy link
Owner Author

bew commented Nov 16, 2021

Since 325f1eb I enabled the interactive mode of the menu completion system of zsh, and I can refine the listed completions as-I-type once I triggered the completion menu.

(it was builtin, crazy right??)

Though it's a bit buggy, like:

# FIXME: completion inside text (with remaining input after cursor) is BROKEN,
# it eats chars from the right..
# mpv-audio-loop tra| --shuffle
# ('|' is cursor, start menu completion (with interactive mode) then accept entry 'trance/')
# gives:
# mpv-audio-loop trance/|huffle
# (=> the entry is inserted, but chars after cursor are overwritten..)
#
# TOCHECK: does it work with a completely stripped down zsh config? (looks like not, read on..)
# -> I checked in an old shell (does not have my new completion cfg), and entering interactive mode
# then exit out of interactive mode to the normal menu mode is ALSO broken.. (eats right chars)
# (don't even need to accept the match)
# => This seems to be a bug in zsh with the interactive menu mode :/
# TODO (bug report): see above (about broken interactive mode when accepting match, when completion initiated in the middle of the BUFFER)

And a few others (look for bug report & feature req in that file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant