Closed psprint closed 1 year ago
Introducing cycling and ice-completion (<Alt>-i
).
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.: <Alt-a>
cycles through the matches.
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 git pr {PR num} [remote]
command. Its coding style leaves much objections but it just works.
I've resolved conflicts. A small video: https://asciinema.org/a/VkIE2I7MfCoaaIh2mPxG6LLep
Presentation: https://asciinema.org/a/OQdu6fPXkEEqG67J7oNhGoVEv
@vladdoster I've simplified the code, there are no autosuggestions workarounds now
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: