From: Joey Pabalinas <joeypabalinas@gmail.com>
To: m0viefreak <m0viefreak.cm@googlemail.com>
Cc: zsh-users@zsh.org, Pier Paolo Grassi <pierpaolog@gmail.com>
Subject: Re: alias of completion
Date: Fri, 2 Mar 2018 12:23:24 -1000 [thread overview]
Message-ID: <20180302222324.z5x2ev65742vltbk@gmail.com> (raw)
In-Reply-To: <9b7ec742-8786-452b-26b7-c064d855f7c2@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-03-02 22:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180302093415epcas3p3d273c63fafad455cca7fec4072aeaea1@epcas3p3.samsung.com>
2018-03-02 9:31 ` Pier Paolo Grassi
2018-03-02 10:51 ` Peter Stephenson
2018-03-02 12:00 ` Pier Paolo Grassi
2018-03-02 12:08 ` m0viefreak
2018-03-02 12:15 ` Pier Paolo Grassi
2018-03-02 22:23 ` Joey Pabalinas [this message]
2018-03-03 6:41 ` Pier Paolo Grassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180302222324.z5x2ev65742vltbk@gmail.com \
--to=joeypabalinas@gmail.com \
--cc=m0viefreak.cm@googlemail.com \
--cc=pierpaolog@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).