From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 7db13e47 for ; Tue, 18 Feb 2020 16:38:33 +0000 (UTC) Received: (qmail 5581 invoked by alias); 18 Feb 2020 16:38:24 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24688 Received: (qmail 15687 invoked by uid 1010); 18 Feb 2020 16:38:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr1-f49.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25725. spamassassin: 3.4.2. Clear:RC:0(209.85.221.49):SA:0(-2.0/5.0):. Processed in 2.864482 secs); 18 Feb 2020 16:38:24 -0000 X-Envelope-From: doron.behar@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.221.49 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :mime-version:content-disposition; bh=N9T3rooR3GJl7V2L7E6lret2pxEZIn39wfbb5MMTanA=; b=Hp0q2WZ6qD3FRDvSmMDv/bbGthoQqbHZfqn6H6ugKwvmbx4VInKFCSkHgxw0eci7ph eR7b+nB+c9p/hlkc8tsNg6MTwmOsrkDD4E8eK6lIsS9d7SdQMx9z5JGMPkZONPbwE2im vMntrYEJrjooobwPa75czJ8y0LDMXOBx/lrPuH1jM9FLk023TNXS759eAowgAdQjvNI/ MjGHZrDLaZHrXX7TdnULWPt9hDz+EVt8df25l8WHWp+fB0mBRR19c9h6UwnwtkrS5bAj OTneiFPI1qBuR2o3VnH74QcI+ga5BvEoM5LDq61AVgjxHuoMPN4EG6rE2Kkp4dMaUMF7 VxFg== X-Gm-Message-State: APjAAAWHQGQ8xASqQe55OSvwourp75KiMbcSGYXkwJF25hwFQJWCWDAd khJ6SStzwJims2g+yXHuwvKgmz5h X-Google-Smtp-Source: APXvYqzfHARwmxIpEXbRiEjHfnzbKt+wVclkz+Dm/FtsqpHtNeqkHvw4NIqpCriEh58LEoiDGjcKqw== X-Received: by 2002:adf:ffc7:: with SMTP id x7mr29616011wrs.159.1582043865719; Tue, 18 Feb 2020 08:37:45 -0800 (PST) Date: Tue, 18 Feb 2020 18:37:25 +0200 From: Doron Behar To: zsh-users@zsh.org Subject: Having a hard time dealing with a completion collision Message-ID: <20200218163725.zdkiord4uaxmutsk@NUX> Mail-Followup-To: zsh-users@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline I'm using todoman and it provides a useful completion for ZSH (I happen to be the writer of it): TIL there's another completion file in ZSH's tree that has `#compdef todo` among other common aliases for it: https://gitlab.com/zsh-org/zsh/-/blob/5c55b3fb50bbfe602fcfa55fa6258e398ecc6b20/Completion/Unix/Command/_devtodo I'm using NixOS and this is my `$fpath`: ~/.zsh/comp/tested ~/.zsh/comp/local /usr/local/share/zsh/site-functions /nix/store/k9rq1cymsrbfybzgx21c5g851085w0fz-zsh-5.7.1/share/zsh/site-functions /nix/store/k9rq1cymsrbfybzgx21c5g851085w0fz-zsh-5.7.1/share/zsh/5.7.1/functions /run/current-system/sw/share/zsh/site-functions /run/current-system/sw/share/zsh/5.7.1/functions /run/current-system/sw/share/zsh/vendor-completions /nix/var/nix/profiles/default/share/zsh/site-functions /nix/var/nix/profiles/default/share/zsh/5.7.1/functions /nix/var/nix/profiles/default/share/zsh/vendor-completions /etc/profiles/per-user/doron/share/zsh/site-functions /etc/profiles/per-user/doron/share/zsh/5.7.1/functions /etc/profiles/per-user/doron/share/zsh/vendor-completions ~/.nix-profile/share/zsh/site-functions ~/.nix-profile/share/zsh/5.7.1/functions ~/.nix-profile/share/zsh/vendor-completions I tried putting the replacement `_todo` file in my first fpath directory - `~/.zsh/comp/tested/` but surprisingly I still got the failing devtodo completion loaded instead of the replacement completion. Assuming I'm not interested in submitting a change to ZSH's source tree, what would be the best way to handle this collision? My current rather ugly workaround is to rename the desired completion's file to `_td` and make it complete `td` instead of `todo` while using the following: td(){ todo "$@" } An alias doesn't work because ZSH see's there's such an alias and it loads devtodo's completion just like it would as if there wasn't an alias. Help will be appreciated. Doron.