zsh-users
 help / color / mirror / code / Atom feed
From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Joey Pabalinas <joeypabalinas@gmail.com>
Cc: m0viefreak <m0viefreak.cm@googlemail.com>, zsh-users@zsh.org
Subject: Re: alias of completion
Date: Sat, 03 Mar 2018 06:41:26 +0000	[thread overview]
Message-ID: <CAP+y1xBcQHtw=FWHAuk-XG8nEcRa910QFs9O9iZhfhVxNeAbuA@mail.gmail.com> (raw)
In-Reply-To: <20180302222324.z5x2ev65742vltbk@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

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@gmail.com>
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

      reply	other threads:[~2018-03-03  6:41 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
2018-03-03  6:41       ` Pier Paolo Grassi [this message]

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='CAP+y1xBcQHtw=FWHAuk-XG8nEcRa910QFs9O9iZhfhVxNeAbuA@mail.gmail.com' \
    --to=pierpaolog@gmail.com \
    --cc=joeypabalinas@gmail.com \
    --cc=m0viefreak.cm@googlemail.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).