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 30408 invoked from network); 21 Feb 2023 19:15:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Feb 2023 19:15:26 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1677006926; b=IOKDHf1fb9soznLcOU4QKuFpkAtRm6aK/EjQd3nlEBc/yBFH3W45VFWRuRaFBCZf89vxPsfQL8 sYusfL0U9Tojp8AEwPnw1ZfW/jmKpQ2pl41Yd3vmSR/3vhlm00/9943bx2JEteGh33nYR6Wi3J 0eDxcDze7bwtCXcgvQqEFvXN2IX6YsddYDV1fmTEd5j07z9TXoH+SNJB3qAPL7jmoBBGJaguKk FlfLCyo7RrMdeT+MUlN218Ozb4a0CKwkpfYNy0MrkK189OEQbctmiGma4Sd+CMxXT4lyHRNSRh s5d6blUrzNwvDn6zTESO/QSm1qnr2uJrEMmpe4vPXSirvA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f43.google.com) smtp.remote-ip=209.85.167.43; dkim=pass header.d=gmail.com header.s=20210112 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=1677006926; bh=EX28vUnZvgnYnWFnrm1AAXa3as2j4cXqCYT2hvRIAHk=; 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:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=FL9GS0T4TP5pFPOvt2toQWQ2XBgdZPeO1KU/MgHopw6IuUyLyIM3tVeF3vNktxfKfELp6p0oiv Ek1T+ELuOEB9LDN0PxmVd2p5Jg76wPJ+jiBApCmmBOk0n88crlolEn+2E0NpDej/zTNR1LfEkq E4QradyPWHRSKPGZR8RCr5LAN3MdJnQjR8O5dNoUBEtemES7VQ/aGFU2X09/JVSFrzbJJvBCV2 h73qme21kKnkUptPREtC8+60cZZKwX+pEy1FZF4xzKNQesUn9vI538QkcXjJ8qrOwtACHEjkZx WH22kXMPSY3sW5a3HIvmqEigz9qIITxSNe9bBdOg9fQYSQ==; 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:In-Reply-To:References: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=DOeKX+t1ogUA9515qPGs18HECUaCOAJRTxCizExwrr8=; b=beC47I4AT9xKJyMo/krw5ei5R1 LriGo5pLb1TVoUMMfkV3QWhQC2X3mDFAaTbxQ/xtrwUkSUMoP3iTYzIQFcQG4H6rqG6D+2NuajdCs Pi6MG+CkC8ZHMsxKkPI2UKNr654mAVKkMDUGZpXw7r8BAqFLhYu/8Eeo3phvE+5GFBvMWcQPr6ND3 tNYHDBPk5hiJ8ZGcoVNzIrkGZbPcATyi1a7S1tKtpjUS3DeVGGVB/RtUsB3Vszgs1hDnKnBvA935W 9z5nDYPFVqlucDiKDfDldKJO4PF9rgsYoRvmgyzOJicrim90lmGDA7XE1VuPVrwF1hTzpq+ubZClm 7yF78ZdQ==; Received: by zero.zsh.org with local id 1pUY6n-000AbA-8x; Tue, 21 Feb 2023 19:15:25 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f43.google.com) smtp.remote-ip=209.85.167.43; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f43.google.com ([209.85.167.43]:40910) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pUY5z-0009rU-5G; Tue, 21 Feb 2023 19:14:35 +0000 Received: by mail-lf1-f43.google.com with SMTP id k14so6096351lfj.7 for ; Tue, 21 Feb 2023 11:14:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DOeKX+t1ogUA9515qPGs18HECUaCOAJRTxCizExwrr8=; b=XljZAz7zSOPVtCLhd12/Qq3b0jTLocwkKRofvKxfSdLTASRFq+GCoySyPwqROKqx20 0B2prC/iNuPI0OQXm5Nc6HiWR83ygiogRLzLUnP7kJDKqxuaPdQnEtKIPvCipvPkGqOX /Nd1PJM9vyuQnv8eS3nW+rY1h3Tr3KYZzmZnCAYpcMnAg6VvUrLectChH4et2ImPGs7A l6o1G0DF1AGATogbOstfphHzsdqPrLqfL+eB2FRU4yTD74WuGQe4gguD2q5Z8mNcuPMP Tm5VxaOzv513Vg/7LbI8KzzHhHYKsCtyzso1RAV6aD4RskNxpdGUdHSE4ltEw8yFQgtc LbrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=DOeKX+t1ogUA9515qPGs18HECUaCOAJRTxCizExwrr8=; b=oAjlqbrKMtbxtTT/CreLq8PbhnuBwxamebF5fBdvDwWwPBhqYl3PpScBqwOEPVcgbT GIEhxEt7qkN8szD5SGjRwvcXq5395BNCDBimjg1zb63SsJAlr12JgtcNm/uWh1F4Mpa4 4mCziXffMf9xmZstwnGGX1hB75xjpkT6jTIRW+dHmoRh5Wis7JIcol5OD/Q+EDfrP+K/ AQgbLXXxdIvXqoBmTxmexFNQ3W7X63G/8hBUjb4b4dbnAIdfkBAJjnxXxqr4P58oUjOz XReXmsfa257VAghNEWCShZ9aq0x3Ifywc5tcOpGOoT0RGsbuLo5lvVUro/fLltNkMwSx fdkw== X-Gm-Message-State: AO0yUKVaC7h3p5qd3L/wc3SBN7YiwbbhCl7XVLA6i07iLevde30TpTE+ 1W+27nBFsBC+g8Nvwr9O1h+91NeOOoD4R7TiO40= X-Google-Smtp-Source: AK7set9X+52YAPyBkiNPVZPHA7z2hMa2vkrqNXQCA2WOEwKGsQfgA2wEn6N8wtugpZrxNMO55cJjG7Eaoy+ff01S154= X-Received: by 2002:a05:6512:73:b0:4d5:ca42:e43a with SMTP id i19-20020a056512007300b004d5ca42e43amr2038164lfo.3.1677006873870; Tue, 21 Feb 2023 11:14:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Tue, 21 Feb 2023 20:14:22 +0100 Message-ID: Subject: Re: completing .directories without . and .. To: Thomas Lauer Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28954 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 Tue, Feb 21, 2023 at 5:59 PM Thomas Lauer wrote: > > From: Roman Perepelitsa > Date: Tue, 21 Feb 2023 17:48:44 +0100 > > See "special-dirs" in `man zshcompsys` for documentation. > > Right. I knew it was something simple but all my attempts to find that > simple thing were getting nowhere. Here's a hypothetical yet plausible way how you could've found it. First, look at `man zsh`. At the very top it has an index. Given that you are trying to customize completions, there are 3 candidates that mention completions: zshcompwid Zsh completion widgets zshcompsys Zsh completion system zshcompctl Zsh completion control zshcompctl is a trap. Hopefully you wouldn't fall for it given this sentence at the top of it: New users of the shell may prefer to use the newer and more powerful system based on shell functions; this is described in zshcompsys(1), and the basic shell mechanisms which support it are described in zshcompwid(1). This hints that zshcompwid isn't what you want either. Let's check it anyway: A complete set of shell functions based on these features is described in zshcompsys(1), and users with no interest in adding to that system (or, potentially, writing their own -- see dictionary entry for `hubris') should skip the current section. The older system based on the compctl builtin command is described in zshcompctl(1). This confirms that zshcompctl is a trap that you should avoid, and that zshcompwid describes the low level API on top of which the user-facing zshcompsys is built. Hopefully, eventually you would've looked at zshcompcsys. Searching ".." would then land you on special-dirs fairly quickly. Note that if you already knew that the user-facing docs for completions are in zshcompsys, the search would be fairly straightforward. There are only 9 zsh man pages that I ever look at (plus zshall if I'm unsure which one I need), and I remember their names by now. Before I learned them, I often opened `man zsh` to see the list of section names with short descriptions. Roman.