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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8823 invoked from network); 8 Nov 2023 21:35:17 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Nov 2023 21:35:17 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1699479317; b=Td3XMORjvR02AvSC+hxDViESoI1FJT5Q5eQsqh0xOesddEuczF2Fl7+12JFYkUuQ8PD9ws8/Cl dP+wjYrc8lKLhabrc0BQSjBGGg1LQeiY53JfEs8cjeRS35l9jBWx/aiNZsp0kU56ygsk4xx3zN hqS7kAzKAGS7GjAo04P5Y6IU4fqZgAfgOjPOucwR+v/K13fh/t5lWLkhYpknnvhBNK5NloSRzT cRMcaJEeXqi6qmJW+/3MRTVGEqDTOF7sji0ISKIq0hgcKfCJMeS0yH+CeDM7w7a1j8LCnyXRRq lpeerX4l5eZB58YegzccP0TpfZM79ilaOc8/woqTBit++w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f50.google.com) smtp.remote-ip=209.85.218.50; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1699479317; bh=DUN5vwv45bRl70lqNBhuDFhNYhf467CDgQABebYX7Ew=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=aUBiDyt4JSqqzBed3yvjEWW/k/Y2HDLvIGeXXuvyek10ZaSZrR4TASi3nX4wVeClIYqyCKsLyR h6TPumaxPHV3eT02pLk9i0pxcyPGRIWcYKVnR62mBTNnTcD0bS6sxU3e4uEo0Ex5JSb4EP5VLB 2JrNPaQlOno3HIfQVFU6wG/11wG6lBijAVhB+H893ZoVxDNxhQZfkRKIp+sQOMoCGc9cB91Lsm +QVtwQ7KF6QRc80MXwdDW0u5nK6S2nFMvrEWMoQKyWCyd5CEviJ/B5PUYubv8MSZDVBncb477C 9QJbobU+xACIsYuYHvzW8UEZfkrUlNUOB6CcEEY/1eMEAg==; 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:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=3hiFSC7sZw5tczA+1zAGk2BRiDaDzSH7NqIpSRFh5F8=; b=O6lPoZ2CbcmenyTF/dr+K1uh5y lV45+0/PTZvJMqB79JtRb32cz1nVtlyfwAr0ngqIPeQ4m2HyY7JJ+S+KIOTP3mV5/3kNn58LfylsY 9fL66Etgnz1bpdYpEqbObrqYvbVDPcFaz6NY5BQAcff2bQSFjveT0jTJ0s6jBH9sYFwPsFuAEY0sq PrxEBfC7cjh5JeRqpmGuIC1kyKSoUVafO2MD1lReblKH5PXorbdmTcXp5wwwf1DftOzrDyWQnwP72 RseUN9HMKeO8rSwdWlQd4hFX2v4gbIe7WSNkPD9018mK7jHxZNSwSSEAkGkrFCm7WiwLhjVOeSpN4 EqO4VIOA==; Received: by zero.zsh.org with local id 1r0qCg-000EdZ-Hh; Wed, 08 Nov 2023 21:35:14 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f50.google.com) smtp.remote-ip=209.85.218.50; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f50.google.com ([209.85.218.50]:46113) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1r0qBx-000DyJ-FJ; Wed, 08 Nov 2023 21:34:30 +0000 Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-9db6cf8309cso34240366b.0 for ; Wed, 08 Nov 2023 13:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1699479269; x=1700084069; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3hiFSC7sZw5tczA+1zAGk2BRiDaDzSH7NqIpSRFh5F8=; b=jWTJN2Ffs2MTrVMQYEfseavBGZZg9oaq0aysEOzMABNMxWqUGH8xR2XJimDco8KaiC i2snVKn+vSUWQvcZe7nT/fh01RT9YUlqJ4kpWpsV0I3oQpmkatV5GVI6u1PyWjZooqZk 759Go0Qe6np19HQ+1iB3Cheo+z9S9Xc0fHH+0BnBorUqjtwY1hfymlL0mzFyjCDeQXFP lzoWZfO/ctcK/tDROEvPeOIQQRyvxVlDc+lK3KV8Yfbh57QvvKl0e3jfEOcL0bsoLDku Yw3y+wxClZo+x03aP6x/83B+iYL98+j+gacjF2dEbjN/BqS1xLx6j+mY/+4jfvx+D4hw o66w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699479269; x=1700084069; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3hiFSC7sZw5tczA+1zAGk2BRiDaDzSH7NqIpSRFh5F8=; b=us7Ei4mgn0qFgL4T5q42KQeB7NmvrofMXFgPplyZyoGx9D6wVgz0v8tuCl17KyUGlO UwXYpfDbg0e1gsr5bveBNRwpHM560i9tA9tOYy3HvkW2YYZFEFvYm153MZk+kNHxRsvr avoRtoTkkV9P/Z+0Em2UnNXKfdnuYtEnC8kU4DTVnGb/Dw85wt86PMf2wcEtAQID1n2f eH1Ib4dgv2ufmYFdBUYdnLGkSgRuLGcNzLSHsnSyxeNPrXfQxpmEcshYMJg2t+NMq5tJ Hf5LsICV61CdiMmYw+hzxnS/P18z+EYdVljsBFKn3aWICTmJV5oW/qdY9LF+7Ag3jgWB gMQA== X-Gm-Message-State: AOJu0Yw1lkwSAiQFRgqVJYOuEk21SHlTzFvilo0L59X+bDucaHHGek8w BX+PLBeyi2p3XFmpjwmAXizCZ38P8Od2XdsjV/I6sg== X-Google-Smtp-Source: AGHT+IHAdX6gzdHBN4oNjBXPt6J7Xe/QIxeyn8JPjZ0VdtLYShSMBCz6SAI9uuq5EQAB2RnTjtS4nmaSwSfSa23Rho0= X-Received: by 2002:a17:907:3681:b0:9cd:5223:e5fa with SMTP id bi1-20020a170907368100b009cd5223e5famr2676049ejc.42.1699479268755; Wed, 08 Nov 2023 13:34:28 -0800 (PST) MIME-Version: 1.0 References: <3focki1mdsq59ji5d0u5nb7qenu6u8brkt@tlc.com> <12faf9bd-a600-4bd8-b90b-4a262158045f@eastlink.ca> In-Reply-To: <12faf9bd-a600-4bd8-b90b-4a262158045f@eastlink.ca> From: Bart Schaefer Date: Wed, 8 Nov 2023 13:34:17 -0800 Message-ID: Subject: Re: completion, sorting of options To: Ray Andrews Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29329 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Wed, Nov 8, 2023 at 12:44=E2=80=AFPM Ray Andrews wrote: > > Purely theoretically, is this the sort of thing where a hook might be us= ed? Not really. Hooks are typically for things driven from the C code, where an escape to shell control extends the default behavior, whereas _arguments is entirely shell code -- you can either call it differently (as I've suggested) or replace it with a different function. The next-closest thing to "hooks" is using the -e option of zstyle to cause code to run when a style is looked up, but of course for the most typical cases the implementation will look up a style as few times as possible and just store the result.