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=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 0e9450c7 for ; Tue, 11 Feb 2020 10:29:32 +0000 (UTC) Received: (qmail 14259 invoked by alias); 11 Feb 2020 10:29:27 -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: 45418 Received: (qmail 16158 invoked by uid 1010); 11 Feb 2020 10:29:27 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25718. spamassassin: 3.4.2. Clear:RC:0(66.111.4.27):SA:0(-2.6/5.0):. Processed in 3.74119 secs); 11 Feb 2020 10:29:27 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrieefgddujecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfgjfhfogggtgfesthhqtd dtredtjeenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghnihgv lhdrshhhrghhrghfrdhnrghmvgeqnecukfhppeejledrudektddrheejrdduudelnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Tue, 11 Feb 2020 10:28:41 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Setting/Querying cache-policy (was: Re: sudo autocompletion) Message-ID: <20200211102841.58f86c93@tarpaulin.shahaf.local2> In-Reply-To: <17405-1581415941.062275@CNCV.ghXS.ifR-> References: <912d22db-8a8f-90f2-6738-f9f395994dcb@gmail.com> <1770be62-54d8-70a6-8b05-cfc98faa9b9f@gmail.com> <20200210030219.527a3ccf@tarpaulin.shahaf.local2> <20200210192033.1bae83dc@tarpaulin.shahaf.local2> <17405-1581415941.062275@CNCV.ghXS.ifR-> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Oliver Kiddle wrote on Tue, 11 Feb 2020 11:12 +0100: > Daniel Shahaf wrote: > > dana wrote on Mon, 10 Feb 2020 11:13 -0600: =20 > > > + zstyle -e ":completion:${curcontext%:}:*" command-path \ > > > + 'reply=3D( $path ${path/%\/bin//sbin} )' =20 >=20 > I don't like it when completion functions set zstyles. I know that the > cache functions do it but even with one bad precedent I think it is > better to not proliferate the practice further. +1 Speaking of the cache-policy style, why do the following places use ":completion:*:*:$service:*" in the =C2=ABzstyle -s=C2=BB call? Shouldn't = that use ${curcontext}? % ag cache-policy Completion/ | grep -v curcontext | vipe Completion/Debian/Type/_deb_packages:101: zstyle -s ":completion:*:*:$serv= ice:*" cache-policy update_policy Completion/Debian/Type/_deb_packages:103: zstyle ":completion:*:*:$servi= ce:*" cache-policy _debs_caching_policy Completion/Debian/Command/_apt:629: zstyle -s ":completion:*:*:$service:*"= cache-policy update_policy Completion/Debian/Command/_apt:631: zstyle ":completion:*:*:$service:*" = cache-policy _apt_caching_policy Completion/Darwin/Type/_retrieve_mac_apps:64: zstyle -s ":completion:*:*:$= service:*" cache-policy cache_policy Completion/Darwin/Type/_retrieve_mac_apps:66: zstyle ":completion:*:*:$s= ervice:*" cache-policy _mac_apps_caching_policy Completion/Redhat/Command/_rpm:433:zstyle -s ":completion:*:*:rpm:*" cache-= policy update_policy Completion/Redhat/Command/_rpm:435: zstyle ":completion:*:*:rpm:*" cache-p= olicy _rpms_caching_policy Completion/Unix/Command/_subversion:26: zstyle -s ":completion:*:*:$servic= e:*" cache-policy update_policy Completion/Unix/Command/_subversion:28: zstyle ":completion:*:*:$service= :*" cache-policy _svn_caching_policy Completion/Unix/Command/_gradle:13:zstyle -s ":completion:*:*:$service:*" c= ache-policy cache_policy || \ Completion/Unix/Command/_gradle:14: zstyle ":completion:*:*:$service:*" = cache-policy _gradle_caching_policy Completion/Unix/Command/_composer:802: zstyle -s ":completion:*:*:$servi= ce:*" cache-policy tmp Completion/Unix/Command/_composer:804: zstyle ":completion:*:*:$service:= *" cache-policy __composer_cache_policy Completion/Linux/Command/_modutils:18: zstyle -s ":completion:*:*:$service= :*" cache-policy update_policy Completion/Linux/Command/_modutils:20: zstyle ":completion:*:*:$service:= *" cache-policy _modules_caching_policy Completion/Linux/Command/_opkg:301: zstyle -s ":completion:*:*:$service:*"= cache-policy cache_policy Completion/Linux/Command/_opkg:303: zstyle ":completion:*:*:$service:*" ca= che-policy __opkg_cache_policy Cheers, Daniel=09