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 1ki53m-000Ogc-0k; Thu, 26 Nov 2020 00:22:54 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wm1-f68.google.com) smtp.remote-ip=209.85.128.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-wm1-f68.google.com ([209.85.128.68]:36604) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ki53O-000ORU-EN; Thu, 26 Nov 2020 00:22:31 +0000 Received: by mail-wm1-f68.google.com with SMTP id a65so432343wme.1 for ; Wed, 25 Nov 2020 16:22:30 -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=e+g6RzK9O8BysuyxMRoU5lYSXOB/rpKw8AAzxnwTUTA=; b=Wborks94d+9zFYEuSMeE4Q9nHOI/g84Avig9sMNEYjBVXf/g4HVQOcDYpQY3SX/+hq EIVAUNWaGSf+eCtTozwxRApv9UqZ6qNjbLS+zcBHOZJCfz+rMsuEU3W+c3nXku/Kjp3U d/gQ0Wt2rP0mXFeNd1QHAJ01DPsE+1FCpehrh2DAuYJo7+YO95MyUbRCSWWH/iykE0w7 x1JUzoadrDJ/KpfU2vITQgmHNN9i0osu8ZvQp21ka/XynWkCJuvEfhiqVTkyH7yRVllX 3gRe7vVDz0LbeIkWdqsqVh6wZEf9IYIYXRTUHQrXtD5dhdsfG6j4u//t9R5+uSV0Qkj/ gQzw== 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=e+g6RzK9O8BysuyxMRoU5lYSXOB/rpKw8AAzxnwTUTA=; b=czEiz1pmuXaXiayDCTO/CqLOw5cHRiJRs8wsZ4rrcH27zp8h8zNGeYJJHaIqF1OP7L kkDKDmzneEeDqZZ5SRACQYGigwnnebLiIf1LAQab6SghRoumrYfjH+DTfIu5n0k4m4Xd 0A1riAmFeiJ4Ijdhay+BXxOQuFZNpVJUH2BzFFHe2TsMcI13tUrFYqFyh88kHAv7Csis s1i1FSzVbvvQz1hWLhQl1AcK5uMs31ASacMb/I76sOCs+6U9ne6P+6ttAh4mGexwHKom EYyDsLvC0nxbZZA3fucx4RMOi+A5K0YGJI+/9iQDsaQOO2LlbNSPy8A0Uiv3IvAQrug/ RuUg== X-Gm-Message-State: AOAM530EGydaVsI4yqg74S8c1N92B3P5pNUPpByMjGntq/hDI4Akt7sw mWuvjIMQbvfUCeMIwnqGXHKgXbl1ahbplWptAG4TwVj/oWg= X-Google-Smtp-Source: ABdhPJy2wvrtr+OfIUret3qkidDrgyDltCs5jrJDL+rMrPgYov5mTEj9NNEEgRpdmzWvwqbi/aO8NRVw9fea8QbBK/Y= X-Received: by 2002:a1c:a145:: with SMTP id k66mr201622wme.173.1606350149971; Wed, 25 Nov 2020 16:22:29 -0800 (PST) MIME-Version: 1.0 References: <20201123175641.2111934-1-felipe.contreras@gmail.com> <3205a2bc-42a2-6d9f-9746-6ac198aff66e@gmx.com> <2fe66d4d-33c9-cde2-2833-e656c07b5a2f@gmx.com> In-Reply-To: <2fe66d4d-33c9-cde2-2833-e656c07b5a2f@gmx.com> From: Felipe Contreras Date: Wed, 25 Nov 2020 18:22:19 -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: 47630 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 4:56 PM Eric Cook wrote: > > On 11/25/20 5:34 PM, Felipe Contreras wrote: > > 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 form of completion that may work for bash since it's completion system > is simpler and user expectation is (seemingly) solely "press tab and stuff appears". > where as zsh's completion systems allows the user to manipulating the results in > various ways which could be lost once $program handles the completion. > > like adding additional results > overriding opinionated file completion set by the author(s) > omitting options you don't want presented to you. > grouping results by tags. > just to name a few. > > zsh's completion system is far more powerful than just presenting a pseudo static > list of options with descriptions. This is a false dichotomy. You can do both things: 1. extract the options and descriptions from the git program, and 2. use code to rearrange them, group them, and do whatever else you want with them. -- Felipe Contreras