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

Re: alias of completion



Joey that’s hilarious... I can’t even imagine what kind of tests you did,
but some voodoo must have been involved... XD


Il giorno ven 2 mar 2018 alle 23:23 Joey Pabalinas <joeypabalinas@xxxxxxxxx>
ha scritto:

> On Fri, Mar 02, 2018 at 01:08:09PM +0100, m0viefreak wrote:
> > You could modify CURRENT and words in a custom completion function and
> > then just call _normal ("docker ls" is one word more than
> > "mydockerwrapper"):
> >
> > _mydockerwrapper() {
> >   ((CURRENT++))
> >   words=(docker ls "${words[@]:1}")
> >   _normal
> > }
> > compdef _mydockerwrapper mydockerwrapper
>
> Holy hell, you don't know how long I've been trying to figure out
> exactly that (but with systemctl instead of docker). At one point
> I even to screw up so badly that when I did `scrs <TAB>` my computer
> simply rebooted itself. Dumbfounded, I immediately tested it again
> as soon as my OS booted to make sure I wasn't going crazy and (as you
> probably saw coming from a mile away) promptly rebooted my computer
> with another fateful <Tab>.
>
> But this works *perfectly*.
>
> I didn't ask the original question, but nonetheless thank you!
>
> --
> Joey Pabalinas
>
-- 
Pier Paolo Grassi


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