From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RDNS_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: from authenticated user by zero.zsh.org with local id 1ki3N0-000LMf-19; Wed, 25 Nov 2020 22:34:38 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f68.google.com) smtp.remote-ip=209.85.221.68; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wr1-f68.google.com ([209.85.221.68]:40052) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ki3Mf-000L7m-0M; Wed, 25 Nov 2020 22:34:17 +0000 Received: by mail-wr1-f68.google.com with SMTP id m6so38657wrg.7 for ; Wed, 25 Nov 2020 14:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4blSkFuCyHw7nfJSHciHMvPeeZLKGvcpbBvmv3rgP4U=; b=tSzR6/TUL3uotTberoVtDsQ1UcCsxZAJhWd8x1vNYrlMx+eKkJ+AWvclZuHCJnXe3S QgX8af/QDPzO+7kLEXIX3IRNcsuenM1T68ox0TkwUoira+sXe3wm0DnLjNqL1V2DHH3X Df+xg7owAdzPnHINU9azpnqa47X3iWFRYKgK1DcJClshYMjeTsqfxCO2xiR85YQpcGXL QFsWpvFue9XnpES1ztZ1ReyldtQZo43kkHH41arkHV8IJgk9q4pE8rISSUhQi9+2L+fF NpbwP6DTJ5OQruf5uZJ19MCraYdh7oHbVcHdzaOqz2DIBy5PmeoOeh8x3+abwc4HxCoO ja6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4blSkFuCyHw7nfJSHciHMvPeeZLKGvcpbBvmv3rgP4U=; b=uOWtpwCtqd+PkYSt4ZzuHFs2KOJNbO2odKU/HkM5nG13d3Z/pYelCzMlVrDO7cf/2u 5pGQ92HNo3I9reRF8M4daFjd31VQSmO92b6A+6mTas6T0xC+T87ipNglqH/Z+b7W2NRE IP137KmOvMQWgfSxv511brudkfyh/9uZ7RQCo1/luGMb9TkNcBD2WobkSEV2SvtTTnFL 4ek2gzzhJFWNiIwDOkdVPxVtZ/BtlyYCbKN49p904/YXKD632YRU7X2cbumovjiask6G 665U1B8GdpP6l7bnlcuoOpXJhv+jdIJo0pHZ/xi/Ui0PlLpLznvIqB0CoR+GsO/6KHgK s69g== X-Gm-Message-State: AOAM5310FicIf/8zNpX8gu/qWd172mcqV261aTY1H0/TmUgaDHjPgiYJ 5dyPi1YEvCECO1iJcTZkoIvPkl39kPX+Jvoz3ftzGC3BVFsiww== X-Google-Smtp-Source: ABdhPJy/A8wxobmmzw6wIkP9PepV0g2wk21kBlJFS1PDkG6AiwTO6OVuu3ri0mmYKsVQuNxkpvjnCw+wqxtPoYjCDMQ= X-Received: by 2002:adf:e788:: with SMTP id n8mr141050wrm.84.1606343656673; Wed, 25 Nov 2020 14:34:16 -0800 (PST) MIME-Version: 1.0 References: <20201123175641.2111934-1-felipe.contreras@gmail.com> <3205a2bc-42a2-6d9f-9746-6ac198aff66e@gmx.com> In-Reply-To: <3205a2bc-42a2-6d9f-9746-6ac198aff66e@gmx.com> From: Felipe Contreras Date: Wed, 25 Nov 2020 16:34:05 -0600 Message-ID: Subject: Re: [RFC/PATCH] completion: git: add fast mode To: Eric Cook Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47627 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Wed, Nov 25, 2020 at 8:48 AM Eric Cook wrote: > > On 11/23/20 12:56 PM, Felipe Contreras wrote: > > This patch is just to show how merging the gitfast/git zsh > > wrapper/git-completion might look like. > > Would the overall end goal be to merge the feature set of the two > completers or just allow the two to be used in tandem? The patch > looks like the latter not the former and if so, is a precedent i > would like zsh to not set personally. I think the overall end goal would be to move as much as possible of the completion to the Git project itself. For example; git commands have the --git-completion-helper option, which throw something like: % git version --git-completion-helper --build-options --no-build-options There is no _git_version() specific function in Git's bash completion, and yet when you type "git version --" the options are completed anyway. This helps so that new commands get some automatic completion, even when nothing specific for them is done in the completion script. It has been discussed in the mailing list to add something similar for zsh specific completion, so the descriptions are generated too, and shorthand forms, perhaps with --git-completion-helper=zsh. This is a lot of work, and it's unclear precisely how Zsh's official completion could leverage it, but I think it should be doable. As for the bulk of the code (e.g. __git_complete_revlist), I think the end goal should be to borrow the way in which Git developers themselves leverage the power of Git to generate completions, and use that in the official completion, perhaps with a "fast-mode" zstyle. There probably shouldn't be any need to source Git's bash completion script in the end. But *today*, the people that want a limble fast completion need to use that script one way or the other. I see no way around that. Cheers. -- Felipe Contreras