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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3920 invoked from network); 2 Sep 2021 20:51:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Sep 2021 20:51:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date: Content-Transfer-Encoding:Content-ID:Content-Type:MIME-Version:Subject:To: References:From:In-reply-to:Reply-To:Cc:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=SNWDpjD4CzPD3jjBeGOB6beoCW1gY2w5vTKzpu3GuX4=; b=lcyQl37z5avs5nkQFUEwAUp+vJ ox0tC2bYxJY/yceHLfKbtonJGEE7kUF+Px1F+QE3ddXNa5PK/GSMiAm55l9LqEDSyiMoevJ9AmoGt Iamf2NquchBOkNDjF9KHbaapfIMQE/N68xjelzLdN8f4BwfWEPcNm9XcPbWMCc4dOfSlhbWgjHxnY s3u2fbXOmM6VAN0I1vT8szo943MfObTLlQe8KhLOwptK/gCxywRisNvXhyn0rw3A8lY/U2gF2hzbc B04kAq4Yct9WjJ12u/Q+E+JcwnZle+Iw+Myuk2pQovurtD2/6mZ567QZmiNFVDpxihEd6tNa2n41f V7Kurzmg==; Received: from authenticated user by zero.zsh.org with local id 1mLtgD-0007Nv-Dz; Thu, 02 Sep 2021 20:51:25 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mLtfw-00074B-HQ; Thu, 02 Sep 2021 20:51:08 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1mLtfv-000EPa-3y for zsh-workers@zsh.org; Thu, 02 Sep 2021 22:51:07 +0200 In-reply-to: From: Oliver Kiddle References: <20210901140327.GB27958@tarpaulin.shahaf.local2> To: Zsh hackers list Subject: Re: [PATCH] Remove redundancies from `git` completion MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <55400.1630615867.1@hydra> Content-Transfer-Encoding: 8bit Date: Thu, 02 Sep 2021 22:51:07 +0200 Message-ID: <55401-1630615867.120247@EZKa.ra6F.k6mM> X-Seq: 49371 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: Marlon Richert wrote: > On Wed, Sep 1, 2021 at 9:23 PM Bart Schaefer wrote: > > > > It would be nice if e.g. «autoload $HOME/gitfuncs/_git_foo» were > > sufficient, but the explicit definition of _git_foo inside _git will > > clobber that autoload. > > Moving all _git_foo functions from the _git file into separate, > #autoload files would solve that. The existing (( $+functions[_git-foo] )) || test also solves it. The only thing you need do is put your overrides in $fpath. In practice, I doubt many people ever do. And if they do, we've probably done a poor job somewhere. This function existence check is not a pattern I followed elsewhere. There are a few things that were done somewhat differently in _git compared to other functions and some of that has been copied. I don't see the point in the double initial underscore naming on some functions. This particular test was rather annoying before $functions_source existed because it made it more difficult to fully reload all _git functions. Oliver