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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31230 invoked from network); 4 Nov 2023 15:50:43 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Nov 2023 15:50:43 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1699113043; b=UHZ4Ql6WP64u/3IB1mQwkWtrC9x9E11UJTfBXfCAKLjQNKmJ6nHcSVIJuZTv3Am0RMnc+S0tDb iIr4/aJRQn/uYN1q5Nx5s1eC+shP+VzjK5i/cmKe/LzXe2utO0AsxQD8525GG9oZJTm5HsxgFS XkhQiQGybE1AbHiUaOAsnNAe5BB7B0diPkslvwZv1xaZBYo4+UNsjbcp0K4n44Mh6wNM5CQ84N xLOICyo/NIJyLYF+kS459C+M9aGzNafDmKL3qi7eP9rWDtlupEhYUqKVEvlcameuQRgQuMV2jc NyPH65fTEY3OU2yGNvj4ugkD7Xd8BOPOMj0QOZaTRfPLRw==; 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=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1699113043; bh=PYrmSM3FJhPdHQYE5Wl8QWZaIr2cX+zrOh+qoNVCPOg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=NWDTHnnLVlyt+SpP6AmDuNTl/aWqIxTBmNo+BBq/xsld0/1yAdv3Cbrcx0LVTcRw80Sd1wG00z mJvhRsx5Q7RlOJ/ddoZABlHCJG+81YrzLeROzq/VB8o44MVMjErmJrJMI9M5LoZ7JLZ8zv2+md eCNnG2JSYZYLVOu5inSXuRx3fMzsZyx8fqnXsVt8AUbHxiD+OAiU1a26OPp5qe8nuhpPtIjl9m +QvnCsoIrT1ZtXwPwbu3CYl3j5rvB68MPUJSOl6+zXZQNMwGOo8VB2PBD1G/+1GMi4YUH6dsy8 DCH5o+KMF7hdW/LhHAJW9Pi7rY8bdGE1JHO/imFG+0X9YA==; 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-Type:Cc:To:Subject:Message-ID :Date:From:References:In-Reply-To:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ih/STyAh/0FWCOLCfk9sEAx+GiTkJseYNsSOIWhVAY4=; b=e/Y8eIRvD8l/Kv3Rq1VNQnr129 lPqbouMkj64k2xXtjNCPYqamBwjzLpFMTCyFaXVRybOr/Xmnj6tB2T2hDzOL1/tP1UTV7CCGTmMjN uvMHaZETaZnd67orTnhBdmgT+sax9ntebQweTPNKMZLfhjMMpnTGHMN4m8a7GksYcLBbnCay5l8UF OAN78+RFK0/L1D7q4KgSpw7pVAVnBaG2gsK3rmoPFstsnCCsuZpkoTd6E/8CJAYfgbUnBZVwlJfJX wu/tAvLipeCzBQ+j8h5YjQxLyxHbrh30q8WVATKH9HG9E6Fs3wpmjJWPUfm4CD/WQvifB3WMUX7AU 7ySIeWAw==; Received: by zero.zsh.org with local id 1qzIv4-0003Q8-R2; Sat, 04 Nov 2023 15:50:42 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f50.google.com) smtp.remote-ip=209.85.218.50; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f50.google.com ([209.85.218.50]:54615) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qzItq-0002hP-Cg; Sat, 04 Nov 2023 15:49:26 +0000 Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-9ae2cc4d17eso474036266b.1 for ; Sat, 04 Nov 2023 08:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699112966; x=1699717766; darn=zsh.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ih/STyAh/0FWCOLCfk9sEAx+GiTkJseYNsSOIWhVAY4=; b=d2RpsZpfbMNsPlPp996o2p06BGWr8IUOVircPfE15AUTt6RaOwTd8NWSOOgfHv5NPh GPND0HQimJBYTI2jBDB9W3lCHSwVU8oKMn7pTr5CgELruAbAA58KzSvC9HFanbq3whzx D7BciEz70oSSyUq/ksc/rjS+tQBnOP3DRtZl8OI3ROWLODzcEiJ5atygK1axdCdyrF0U I8UiLDq7Y31T0oOoE2T6S1nE4EILW1xizgfz3u6+rks05HiSOIq7mPhrTtPYBAlPpR/r jTPEQh9ev9P90XCoR4IGEQoU5aITo70BLCjVp/jis/FIpkbig/5UK0TZLDIANEnIGI+P D76Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699112966; x=1699717766; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ih/STyAh/0FWCOLCfk9sEAx+GiTkJseYNsSOIWhVAY4=; b=o1UR5RszczEpKIRTNjG3vIq1hYoM4LuQZm17wVXXI6QagyVoL1tyTgr3wJm+X/qIhD 2k1iPGLCPrbQXtI3tnCORxHGC69U2wQyW2g9TP5WyWlkNeKOd0qIiOftNxUUA4Vq+b7t nSfOMJpymFNEm8PQ+YmjWcdrBnxHxZIoXUW1rzbrx9AOhjejsNuzej59QaMa/HvybpIp 9kvj5MmqOTlR2zoKy3DWhIUo34zjuruK+2nt8tU+Vsi6fJid6wzejl4QEuM3rQ/vRsf2 SRqDeDhWh7kTVUIdGd+nuV+RSIqETBfxD9YfBZy2fV35+znpgMThET7EzmtN9E3wRQpm TQvA== X-Gm-Message-State: AOJu0YycLtKWleVXIx51OPuj8Z9V0FUkdLv2qLwoitFm64Zr+L1X798x tWXUwG9RIAU/DeoKSjgoOcCZI5MaD6eaGIXYKc4cgFFP X-Google-Smtp-Source: AGHT+IF2qkWdM/kBWjCGqUxz6UIi3CioS+iWHtXwocGHRZjZFMyBJLk6Ad/+xezq2u4OyJmJE1NswtKWVDcL98sT6io= X-Received: by 2002:a17:907:3f85:b0:9b2:b149:b81a with SMTP id hr5-20020a1709073f8500b009b2b149b81amr8832195ejc.64.1699112965634; Sat, 04 Nov 2023 08:49:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:7208:3106:b0:77:b33a:7b21 with HTTP; Sat, 4 Nov 2023 08:49:25 -0700 (PDT) In-Reply-To: <3focki1mdsq59ji5d0u5nb7qenu6u8brkt@tlc.com> References: <3focki1mdsq59ji5d0u5nb7qenu6u8brkt@tlc.com> From: Mikael Magnusson Date: Sat, 4 Nov 2023 16:49:25 +0100 Message-ID: Subject: Re: completion, sorting of options To: Thomas Lauer Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 29321 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 11/4/23, Thomas Lauer wrote: > So I'm writing my first completion file (gory thing, just the right > thing for a rainy Sat afternoon). The completion file itself is more or > less working, but I've run into trouble with the options display after > "-". > > Basically what I want to achieve is that the options are listed in > precisely the order given in the completion file (there are many options > and some are much more probable to be used than others, so I want these > at the top (I know that further typing will limit the shown completions > but not all people using this will be up to that... a simple up/down > might work better for some)). If you give -V foo it will create an unsorted group, but it is a bit unconventional to do this for sorting regular options by usage. You could also consider adding the common options with a -J common and the other ones with a -J rare, or something to that effect. -- Mikael Magnusson