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, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12613 invoked from network); 16 Sep 2022 03:18:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Sep 2022 03:18:30 -0000 ARC-Seal: i=2; cv=fail; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1663298311; b=I3GyfQfPn2mFa8l7sa8fk3akgEgIdciaruw73lf1ByWM8GsZJip1xAtf/OOFKk8ihqufij8vyj uqZ+Qtfk9b+T0FcteD5JdBosaIhrN+P2ZpdU1+5ZpM4XWiBv8IsWvv6A/EXcuWaIBbDOTpH8xW CSdSumYkWFwRw5jZbZsK8ralzhYyt+enP1fb6vS6pLKD+rDX9x08NHCdmJrBTAoOsHlxYkldI9 Sl4aHiEv5ykUeT7cTp13nanq1IipKVAe2LFa12sgLwQBMj1BiGslNZgDbPvbLOvrHWAv2sCEjy HTrYj0maHq0AtPnl1BODzsXNKmSV0v7HJUApoDwObffN9Q==; ARC-Authentication-Results: i=2; zsh.org; iprev=pass (insect.birch.relay.mailchannels.net) smtp.remote-ip=23.83.209.93; dkim=pass header.d=easesoftware.com header.s=default header.a=rsa-sha256; dmarc=none header.from=easesoftware.com; arc=fail (i=1)(AMS body hash miscompare) header.s=arc-2022 arc.oldest-pass=0 smtp.remote-ip=23.83.209.93 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1663298311; bh=X0vuL7OlNE6TbxRA1DSjMdjutTLZSd8pe2Rqe+KIMFs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:Date:Message-ID:Subject:MIME-Version:Content-Type:From: DKIM-Signature:DKIM-Signature; b=CpOpPOtcCKoWoy0VbRZhg7e9jGPXtS+mLOW6g2sGqUmeuWtvqL/+dReVPb+C/hhR4NLPkFZz0h BaBpuwclYi6g5NXM2zJF+tD3f27mKVzsRYcdhOviqXXFYDQ85C6+4tdZiCh7+qa5r8F+bvmsYa 1ohpj/lvEMeo3X9QBNUcFxgO/7h6/VqfyynspVLOIphBVtGCk3XA0EpACPWqziwPH/Ev9Ojr+h EQ+iXdQHeOag2t1lpNIBS+xNZI4RFCi3Wr1UX6o44AMmZXYp27Sqx2cVtQEO3P/w6wIlND8JZ/ CLTt1Y9gv2gtd4G2z/jfT1DDJ/xC2fuVqg/iClJP/NDmlw==; 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:To:Date:Message-Id:Subject: Mime-Version:Content-Type:From:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=YCyqMaM/DVZIusHDTujE+ANDerQUuCANm2KRby7PnFM=; b=SRUjaVELzEaHsao2cV8UODW8Rz Q+G5OtfdwLEt83O+ZF7JTNV3sEvzBP0BOqT2qc8TCw1nA01QVtPPbv+zrtC/MIeRATlz+UMZfrGDJ qI65kmPuVc34Ic69xGxgvvYIgU0ADhjU/Bb5v8WDnt0h2hlFi/1Ibx88ksVpLiN8VJlj49RctiiMF KCuM0qSs5pu5jonVCzzqEOOKFstwPvGQjw92zc3SV6izHzW8k7S61Oc3tH4qutwYYtEHGOgwrEQWo HOptsl4ILVrxiklsBPRawkNSwm7Jd0ON0YrAlruh4NiPugaIuCRaW9vxSn/qo8Q31KaB1afc0OrYI tmgntQxg==; Received: from authenticated user by zero.zsh.org with local id 1oZ1s5-000HiT-76; Fri, 16 Sep 2022 03:18:29 +0000 Authentication-Results: zsh.org; iprev=pass (insect.birch.relay.mailchannels.net) smtp.remote-ip=23.83.209.93; dkim=pass header.d=easesoftware.com header.s=default header.a=rsa-sha256; dmarc=none header.from=easesoftware.com; arc=fail (i=1)(AMS body hash miscompare) header.s=arc-2022 arc.oldest-pass=0 smtp.remote-ip=23.83.209.93 Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:4395) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oZ1qO-000H2A-3H; Fri, 16 Sep 2022 03:16:45 +0000 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DDC592A287F for ; Fri, 16 Sep 2022 03:16:41 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 071772A28A9 for ; Fri, 16 Sep 2022 03:16:40 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1663298201; a=rsa-sha256; cv=none; b=punVafHwxOtAkQOWKS0uxt8bV0/GCKo8sdymTd8pyCWXmpD6GVJAUXkWl6ynt/6MsCA62r McRKTHOL49l6jlcM53SxKFYVuSkDu/iEZOjCk6dprFCVnrdfsZcliWjETpwWfm/qB3qkwc 7HcOALtH1+aNOp6ah4ZqrWgAYmx0x+nOPs5n/fBIoE0kPi0I7PQy9xngLUzdi3KE1SH68k 5j/5d/l/e1oqRFVppCeaVmiA3w1ptG3DU38B5/WNOnFvr51QorAWftVnI4rj6EHalwPwU+ RTBRuvW+bzxtTfXuZ9MSHMgNIU+wlBewRY7Sa+lrNKleFiQrH8kLerKYzlf7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1663298201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=J3mEky9jMY/Sd9vbT6Y38n14dWO1CZ8knCRhmRAypZE=; b=jAnlHiS8jSfqFmIWTAOz5SMIzijx34+hquOZBRXwIjJk+39l6Od/J5z4DlGEmWz9aEgkUp GsenlEddzBskVfDftyhDWyN8M0YrC2X4YLZUstHuH9cPOnfPGad3ttGmUTpYzrjRuDgeef 2qfYJkFNSG/oxPsVLVTsMxRxFF7oPsqdpQbtMKx4Ujbwo10/pVQI2SGAJwL1xUXx5kBZ98 wEQ7CfAQdTmtCStZXEOdZhHDLB74k5KF6KXzQm9OHyg9X+wCB4Olm9I+72apbhwo5x11WA rSDLB0wVrdx+gZPuTHjnzYnA8m5hlgC4FjJDnVRFJiua9vlnwvka7LPNXXntEg== ARC-Authentication-Results: i=1; rspamd-686945db84-h4xmf; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Exultant-Inform: 1d14ab6b3d50a2aa_1663298201377_842558688 X-MC-Loop-Signature: 1663298201377:4293361977 X-MC-Ingress-Time: 1663298201376 Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.120.38.177 (trex/6.7.1); Fri, 16 Sep 2022 03:16:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Type:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YCyqMaM/DVZIusHDTujE+ANDerQUuCANm2KRby7PnFM=; b=bZU1/uWEA5fZczJVjgYGOdj7gj vSke345jHWAYPe5JR+GdT4qw4Nt6SAEt8PHmFUb3M4t8Bl76S5jaZqC07iS+z3ymz6A4YFoUJS+mm cvFosuFr1DuNSxhq+NcPOljyj3fn18FLR3c4bdxQSGH8iZ9D73+T4Gv9XkaZv+Id3QGpXmnBReT/m aXQmgmbZG/nk8GRF0nzrg7n63u6dDUo/EmPRBRDkEOXi5YsF/T6aBZZSnFFc+45STonkxU4X/CmOr hAKevOXhqJRO6v27C0deoYWVTn3H4AP+QajRXH785BivVvOuKRuVlUlAj6EIdEUkMvXKcx56Cg3Zc KHyjSyuA==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:51712 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oZ1qJ-0004uG-Hp for zsh-users@zsh.org; Thu, 15 Sep 2022 23:16:39 -0400 From: Perry Smith Content-Type: multipart/signed; boundary="Apple-Mail=_4E4BBC78-1ECB-4C5F-A893-838A0420A827"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Is "dynamic-dirs" special? Message-Id: <8272985D-00F1-4177-8F0E-F090E09BEBA4@easesoftware.com> Date: Thu, 15 Sep 2022 22:16:38 -0500 To: Zsh Users X-Mailer: Apple Mail (2.3696.120.41.1.1) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com X-Seq: 28089 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: --Apple-Mail=_4E4BBC78-1ECB-4C5F-A893-838A0420A827 Content-Type: multipart/alternative; boundary="Apple-Mail=_4E52F041-84CB-42A5-8028-FEBA0DE46A96" --Apple-Mail=_4E52F041-84CB-42A5-8028-FEBA0DE46A96 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99m wanting to do basically what this function does. It comes = from the zshexpn(1) page and other zsh documentation. I=E2=80=99m = trying to =E2=80=9Cvaguely understand=E2=80=9D without diving into the = fine details what this function is doing and how it works. In this case, I understand everything more or less except the _wanted = line and in particular, is the tag "dynamic-dirs" any arbitrary tag or = does it need to match what the higher level driving functions are = looking for? I read briefly about tags and it seems like they would = need to match up but I can=E2=80=99t find dynamic-dirs anywhere in any = code that I=E2=80=99ve grep=E2=80=99ed. Nor have a found any type of = list of tags that are used and what they means except the example of = =E2=80=9Cfiles=E2=80=9D and =E2=80=9Cdirectories=E2=80=9D mentioned in = the first few paragraphs of zshcompsys. zsh_directory_name() { emulate -L zsh setopt extendedglob local -a match mbegin mend if [[ $1 =3D d ]]; then # turn the directory into a name if [[ $2 =3D (#b)(/home/pws/perforce/)([^/]##)* ]]; then typeset -ga reply reply=3D(p:$match[2] $(( ${#match[1]} + ${#match[2]} )) ) else return 1 fi elif [[ $1 =3D n ]]; then # turn the name into a directory [[ $2 !=3D (#b)p:(?*) ]] && return 1 typeset -ga reply reply=3D(/home/pws/perforce/$match[1]) elif [[ $1 =3D c ]]; then # complete names local expl local -a dirs dirs=3D(/home/pws/perforce/*(/:t)) dirs=3D(p:${^dirs}) _wanted dynamic-dirs expl 'dynamic directory' compadd -S\] -a = dirs return else return 1 fi return 0 } The other question is about the =E2=80=99n=E2=80=99 section. It is = going to return a reply even if the directory doesn=E2=80=99t exist. Am = I reading the code right? I guess this would be nice if I was going to do `mkdir ~p:foodog` ? Thank you for your time, Perry --Apple-Mail=_4E52F041-84CB-42A5-8028-FEBA0DE46A96 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
I=E2=80=99m wanting to do basically what this function does. =  It comes from the zshexpn(1) page and other zsh = documentation.  I=E2=80=99m trying to =E2=80=9Cvaguely = understand=E2=80=9D without diving into the fine details what this = function is doing and how it works.  

In this case, I understand everything = more or less except the _wanted line and in particular, is the tag = "dynamic-dirs" any arbitrary tag or does it need to match what the = higher level driving functions are looking for?  I read briefly = about tags and it seems like they would need to match up but I can=E2=80=99= t find dynamic-dirs anywhere in any code that I=E2=80=99ve grep=E2=80=99ed= .  Nor have a found any type of list of tags that are used and what = they means except the example of =E2=80=9Cfiles=E2=80=9D and = =E2=80=9Cdirectories=E2=80=9D mentioned in the first few paragraphs of = zshcompsys.

    = zsh_directory_name() {
      emulate -L zsh
      setopt = extendedglob
  =     local -a match mbegin mend
      if [[ $1 =3D= d ]]; then
  =       # turn the directory into a = name
    =     if [[ $2 =3D (#b)(/home/pws/perforce/)([^/]##)* ]]; = then
    =       typeset -ga reply
        =   reply=3D(p:$match[2] $(( ${#match[1]} + ${#match[2]} )) = )
    =     else
          return = 1
    =     fi
  =     elif [[ $1 =3D n ]]; then
        # = turn the name into a directory
        [[ $2 !=3D (#b)p:(?*) ]] = && return 1
        typeset -ga = reply
    =     = reply=3D(/home/pws/perforce/$match[1])
      elif [[ $1 = =3D c ]]; then
  =       # complete names
        = local expl
    =     local -a dirs
        = dirs=3D(/home/pws/perforce/*(/:t))
        = dirs=3D(p:${^dirs})
        _wanted dynamic-dirs expl = 'dynamic directory' compadd -S\] -a dirs
        = return
    =   else
  =       return 1
      fi
      return = 0
    = }

The other question is about the =E2=80=99n=E2=80=99 section. =  It is going to return a reply even if the directory doesn=E2=80=99t = exist.  Am I reading the code right?
I guess = this would be nice if I was going to do `mkdir ~p:foodog` ?

Thank you for your = time,
Perry

= --Apple-Mail=_4E52F041-84CB-42A5-8028-FEBA0DE46A96-- --Apple-Mail=_4E4BBC78-1ECB-4C5F-A893-838A0420A827 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmMj6pcACgkQjxzk9yzE +MC5CQ/+O4l5Pt2kYxWiN+3wEdRtaIseo0ag39TrTTlk2cY3VVTCI2awTgEn+DRu Sa0V7feqTl5qZqFcfMD1WQzFTmx/x/TCpcCt+0a3Fo2WrEgRbK9lYKXhM2oigYzB 7qIUDLCXZzChjhKFecY4yBRwRd4AH/UKdy8sTtNoXJNtTqaiZ1ksfNX69rpUpFS5 eCJ8yNOUSGJgCMnaWW4m1p+560gA6hea6hyhcMELwEW5jDknx2foYbFbSJXg3Jhc oLCNdDtsXad/V108iQkQDmkPsRg9yfZMVCeQAtmtsDen1PmkXbjY66s4EaWIEaBh WA8udm4IvUJy5etI3q5y4Cs7bJj1bRRNsSPDL7n6Pi8C9g//983ry9qum7VF9xEv teJTPF0+rbqLthiRTpGoMe4IqHZpxFCJ/AiKQQze/PHLwG9vLWrJm+y615Qq6Na/ fpKlCgt0+vTEN4dyrCobyoIuY8ha8Y4ur4T9Feec7dPrcPMvJ+VW1hkc0WgBi3io VQcgcnJCYNry7r9wQdpDooV1BeS6HDjdrpmFqvu2DksU0YCAY3b1Hcnf0o4yJnFy rHxGppeGFm3vplYMTDTBPjEGLmtt1nVO9nkyN8bUTVQO1dFjNWKRQFsjssoljxzA Ycore2tII2XhX19hHl6hBdhHZpVHfCJ4NcMIj0GdnmMfnzaTYW4= =uhlW -----END PGP SIGNATURE----- --Apple-Mail=_4E4BBC78-1ECB-4C5F-A893-838A0420A827--