From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 15489 invoked from network); 29 Mar 2020 04:16:04 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 29 Mar 2020 04:16:04 -0000 Received: (qmail 11763 invoked by alias); 29 Mar 2020 04:15:50 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45646 Received: (qmail 8599 invoked by uid 1010); 29 Mar 2020 04:15:50 -0000 X-Qmail-Scanner-Diagnostics: from mail-pl1-f174.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(209.85.214.174):SA:0(-2.0/5.0):. Processed in 1.470825 secs); 29 Mar 2020 04:15:50 -0000 X-Envelope-From: henrimenke@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.214.174 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:mime-version :content-disposition; bh=YRAZGq2tYphfMrWkX1gcFQlW21rD5DYv4RSReUVYVUc=; b=CxIxEkMMgHLqHSEQoclGl1xMa7V0cCRDRI51sPZhUT9hfNE6aJsZ0Jr4Sg/wq/060C 6q5jUjHIw009O3TQl5hjk32D1YLpzBfUpIEoiIGTlfRfUWXIgcA8oBXsau2SNfaR3uTv QbMixf+W/I1nXz1PSyH8kFymu7vMR4nAmFKLTFWSexv6bRGpIm4xUdXHBKt00Kg8fF45 VvISCXrpz3Qzy9tj3yYFDT8YWJx5F8sx6vQxcizLhWJNwyFHuOJBM4Qc3m8cVl5R72nJ 1elZrFIwpC5npRqiON+v3MnXnnrl7cpKW/39+DLMWu6LuNQJcgdTWa4wNucYCfFk+YH6 YPrQ== X-Gm-Message-State: ANhLgQ1enGR2XDV9LA7LUG7XFDhzGRS512K7EMmDq2WbdQF8H37a4eQ5 Ryzp3lVBSLN1DbIQGVNbtrZede+h X-Google-Smtp-Source: ADFU+vsIw5R7eE9px1DumhwrVAUFHJvEWlorRrR9C5Y/QHATJNoUcc+F48rpL5+5P6Ll6fn+E54pgQ== X-Received: by 2002:a17:902:9004:: with SMTP id a4mr6088348plp.275.1585455313570; Sat, 28 Mar 2020 21:15:13 -0700 (PDT) Date: Sun, 29 Mar 2020 17:15:09 +1300 From: Henri Menke To: zsh-workers@zsh.org Subject: [PATCH] completion: Unison uses the $UNISON variable Message-ID: <20200329041509.ao7tcppwp55qmmtu@worklaptop> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7aybbbq3pa6dsweg" Content-Disposition: inline --7aybbbq3pa6dsweg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Dear zsh maintainers, Please find attached my improvement for the Unison completion file. Details as to why this patch is necessary are in the commit message. If you need clarification or want me to improve the patch, please reply to me directly, as I am not subscribed to the list. Kind regards, Henri --7aybbbq3pa6dsweg Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-completion-Unison-uses-the-UNISON-variable.patch" >From ba2b421f957a42378ac180827c07a27d0946630a Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Sun, 29 Mar 2020 17:07:31 +1300 Subject: [PATCH] completion: Unison uses the $UNISON variable By default Unison uses the ~/.unison directory to store its cache and profiles. However, this location is configurable through the $UNISON environment variable. Quoting from the manual [1]: > If the environment variable UNISON is defined, then its value will be > used as the name of this directory. This patch enables users to move the .unison directory and still enjoy zsh completion for profiles. [1] https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#unisondir --- Completion/Unix/Command/_unison | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Completion/Unix/Command/_unison b/Completion/Unix/Command/_unison index 2a3333742..d8cf7458f 100644 --- a/Completion/Unix/Command/_unison +++ b/Completion/Unix/Command/_unison @@ -86,7 +86,7 @@ _arguments \ if [[ $state == profile ]]; then local -a profiles - profiles=( ~/.unison/*.prf(N) ) + profiles=( ${UNISON:-~/.unison}/*.prf(N) ) (( $#profiles )) && \ - compadd "$@" - ${${profiles#~/.unison/}%.prf} + compadd "$@" - ${${profiles#${UNISON:-~/.unison}/}%.prf} fi -- 2.26.0 --7aybbbq3pa6dsweg--