-
Notifications
You must be signed in to change notification settings - Fork 137
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
Initial version of an idea – an on demand plugin-id completor and #331
Conversation
Introducing cycling and ice-completion Cycling will allow to choose a particular match, say for, e.g.: zinit at<Alt-i> » zinit atclone<Alt-i> » zinit atinit<Alt-i> »
» zinit atload<Alt-i> » zinit atpull<Alt-i> »
» zinit run-atpull<Alt-i> » zinit atclone" It works for plugin-id completion in the same way, i.e.: For ices, the value of the ice is preserved, e.g.: zinit at'./configure'<Alt-i> » zinit atclone'./configure'<Alt-i> »
» zinit atinit'./configure'<Alt-i> »
» etc. |
@vladdoster Hi. Did you maybe tried the feature? You can easily switch to the PR via the @tj / git-extras |
verifier. One will be able to obtain, e.g.: zinit fzf<Alt>-a » zinit junegunn/fzf zinit cd rip<Alt>-a » zinit cd BurntSushi/ripgrep zinit cd tmux/tmux<Alt>-v » "tmux/tmux" highlighted eighter in blue » or red, depending on existence of » such plugin and so on. The <Alt>-a and <Alt>-v shortcuts work with ALL commands, regardless if it's zinit command or not. Two autoloaded functions added, ziactioncomplete (the proper imple- mentation of the main features) and ziprocessbuffer (a very useful library function that takes care of $BUFFFER/$CURSOR processing).
18a03d2
to
ca914a8
Compare
I've resolved conflicts. A small video: https://asciinema.org/a/VkIE2I7MfCoaaIh2mPxG6LLep |
80c1630
to
489bcd9
Compare
Presentation: https://asciinema.org/a/OQdu6fPXkEEqG67J7oNhGoVEv |
@vladdoster I've simplified the code, there are no autosuggestions workarounds now |
04b424e
to
7b56da7
Compare
Cycling will allow to choose a particular match, say for, e.g.: zinit at<Alt-C> » zinit atclone<Alt-C> » zinit atinit<Alt-C> » » zinit atload<Alt-C> » zinit atpull<Alt-C> » » zinit run-atpull<Alt-C> » zinit atclone" It works for plugin-id completion in the same way, i.e.: <Alt-A> cycles through the matches. For ices, the value of the ice is preserved, e.g.: zinit at'./configure'<Alt-C> » zinit atclone'./configure'<Alt-C> » » zinit atinit'./configure'<Alt-C> » » etc.
7b56da7
to
dbf6f4d
Compare
I'm closing because the feature is mature at #406. |
PR provides an Initial version of an idea – an on demand plugin-id completor and verifier. One will be able to do, e.g.:
and so on. The
<Alt>-a
and<Alt>-v
shortcuts work with ALL commands, regardless if it'szinit
command or not.Two autoloaded functions are added,
ziactioncomplete
(the proper implementation of the main features) andziprocessbuffer
(a very useful library function that takes care of$BUFFFER
/$CURSOR
processing), which is little uncommon forzinit
(to use autoloading mechanism by the plugin manager itself).Description
I'm looking for some ideas of what else interesting can be done by editing of command line by a widget function hooked to a key binding.
Motivation and Context
It solves particular problem of problematic, lengthy plugin-id entering... Completion doesn't support
for
-syntax, so big win here. Also, I think that action-complete has better responsiveness than regular completion (in the scenarios that it also works, likecd
subcommand).Related Issue(s)
How Has This Been Tested?
Types of changes
Checklist: