Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias of completion
- X-seq: zsh-users 23198
- From: Joey Pabalinas <joeypabalinas@xxxxxxxxx>
- To: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- Subject: Re: alias of completion
- Date: Fri, 2 Mar 2018 12:23:24 -1000
- Cc: zsh-users@xxxxxxx, Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K0Nkw0LfRFPpPqV03CUeuZjnleF6DsKJpBUcS3C1Vvs=; b=o2S/l/RNZQfcbs3eYY+7hNTXQche87w5p8vH8juXOuXhP8qghU0ZpOJd+IoeLmNAr6 Nve0RkrpQfkhUINPIuKXrfbzL9x2kN5P4We1I+Ime8RXK3zxDdJSog72AHuQ8bWZYQOg y5DbqHGLSuF9V677Wc52XaEKgAaSdHjFvMSP+MkJG8EBw2dfok9P3JiX7/5s0nostyrd I7FuZ4kAbpk8hwsUcpvqSE6GhVN22WaBQn/f85B3CAq6yX3GNskBI1unYk8Q7emTKAj7 kf3PytslY8r2NxAZ+LsdxbIXHcDgdGSaotYtgADrcOcIS8wzu4klgliSW0QN2GqkPKjv bakw==
- In-reply-to: <9b7ec742-8786-452b-26b7-c064d855f7c2@googlemail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAP+y1xCmn1bDmajXY39N=TOgdRbjGLdGVMJrUPnpq_--6+3QFA@mail.gmail.com> <9b7ec742-8786-452b-26b7-c064d855f7c2@googlemail.com>
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
Attachment:
signature.asc
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author