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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29972 invoked from network); 24 Oct 2023 21:57:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Oct 2023 21:57:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1698184631; b=iTcSSZwu8lGSkFPqbxZwcXURCaS9kdpoUAaOvIJhmsX/8FNn8tdtIFD5lS5YBjqXIXQ8+KpVQ1 BIwBOvv9Q0vYSrPZpgFu6tnlE49kyaQOYxas29gwm3KhFEAKXEXy2BNhlQmwG15LVfLsl5jsr5 wASyYlC/acw68M1xa2wbE0x7yR4TggTKJVTUWGmvVr62gZNVTN70hkMgk36RTk5yzjOJqZE7O+ rj37v3Z7OErpkCm1DGJSzMWsSWl5iTj1TBsTbPoJpQBd9eOk4BzqrqapBVToGCCv1oWSA7Teyu sKyrnlKGm9NbPXykVoOqcmfIj+Y4BQi8O9uoBJz0tb8Vcw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; 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=1698184631; bh=Pbyhugr3aw9FFhjEaEcM6JgoWD+N1xJG3tYx8wQHfe4=; 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=ewX6bDpJsunWMxMnBtafd3DTsxQFWPW5r56fAic24tpHtjs7DVWaAqmRwrx3whCJpbm7L6WEa3 dLCcO/32cRKVTkmP64OPWnMX7WLwBDsLyqKp3vOQA+x1UlPf1/2RiVx11uTmcVkx9amMeLYZvO VFzTQEwIwoIUPzMASOTzyyTkovl9+iy1gEGmELiCoricghFA85ZtebY6iaexN+pfsSSGGFux8b Fe+BdGKMLWWgCqIxM+4ErTxqAARIL/QMVdhxFWiczaN5bC5i6GLFAo+g/gIej2qBxlfa7h474b SsOhy3fzp7VN/TUApalrFhX7QwGdk0gN7UH+PbP3hcv/Ug==; 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=74yf2w2iIj605fUV0DNR6eaeu+iT/xeDPLRACE3EkqA=; b=aSRFkTthoPoLNgF5h+sMMUSVYs ZGVRRUHlEVjRUpVHuBUQJCfHyzbN4uvCN1QUZ++lBoovzsAYo8b2u7eTheYE3hg/KgtYwlJ/cDYCh FWxTQ9WSOQKy4aovV54h8M6OIe6BRUGloKw7jsXbZnbWTfgPXawHiLHVNdFuR+4dXKWcPHhWu342h GMUnFSI4zPWA1ZaPKYx2jvBX5iuZIC7Pt8FwhaLgzkM9mDD1zyRKEr7WndanEpsalmcslRO9ft1id s/XlDF9HQIHuLFbTEu2VR7NbxxG85HQHeGfKEGrwWyh6raV8ssp7N0MaxJrhRmfvW3O+rFQUfEVSb 1gu24T2g==; Received: by zero.zsh.org with local id 1qvPOg-000Fc4-5n; Tue, 24 Oct 2023 21:57:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; 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-f43.google.com ([209.85.218.43]:54748) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qvPON-000FKH-AG; Tue, 24 Oct 2023 21:56:53 +0000 Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-9ae2cc4d17eso747598966b.1 for ; Tue, 24 Oct 2023 14:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1698184610; x=1698789410; 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=74yf2w2iIj605fUV0DNR6eaeu+iT/xeDPLRACE3EkqA=; b=AxinLFgA9Wo4f7EbykGiz34IGpVE5ufR5JIdzUN3b9iKG1QchD1EKtJmVMcs7tozmv cyUPqtRdb0EXZFlHvXK4a4wA0iCwlcm0N85EI/IP3LR7ofBHDe6v5Y7XnvFO7xX1XFA3 aeRkUs3f1uddBIUkdMO+80TFw3Efz5ZPJPaYOSiNO8QQRsa9mcz+ZaHnkPNX45Pxkwm8 uA1YekpoCvYXHSF3TitJYQF+8p05Rd8LpPQM6unyailnZCWAW0SJLwYDzlO6Ue2/JNbw Y3nO6Whww3rKSd02rQZPOFlMsn2U9O9uue71Iv2Pv8MPIso+G/9NRQawyZJ/HS5/bwki 5sDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698184610; x=1698789410; 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=74yf2w2iIj605fUV0DNR6eaeu+iT/xeDPLRACE3EkqA=; b=RhN7371BYN9u68BnZOBlB0/ciDoaUcoOabhvVVXHEVxd6+wAkJjJ25YoEWVWgSCiai scChKCT3zuEnnkaGm6gs9nlaibNAHJQJORa/sUk+2Vm53AyXv3HpCDJnl8FXeArys0sq 5i3hU4fpTYseDaO/xcqPNashrzkibvsVsXXExrGnrwkWZEh+NB2fsU3zJQqP/GOWTBe6 CoHcVhnvl3iIBmB+udiopVQn8JY6VoK0RLNhXHd9z74S4zZBKyE4Ly1JCplqGRSv3g8s Z9+F/dZcn6x5ADcXHNyakCM5XZy0cGd53wPVC8FKc0hzzNZVQHCFAgjXcM6M97P9eHgI r7YA== X-Gm-Message-State: AOJu0YxYCvYdKiJV+Z1fs/xYeBLGMnbylJRphcAH+HfdheNu+oPIT2s9 yBIFLTliIfKWJQi3jV6E7ryNIFPvQhbi0Mm6PqIEq9Sd5rcktmj0 X-Google-Smtp-Source: AGHT+IGyk/9hLQX/h+r02KvQSibDvK5dNvggDpf0ofoszkb/AtThBJVbmNRll0CQ7Ij596FrJ4HWQLWd8T3dJq1/jZk= X-Received: by 2002:a17:907:d06:b0:9ae:829e:d930 with SMTP id gn6-20020a1709070d0600b009ae829ed930mr12415199ejc.9.1698184610310; Tue, 24 Oct 2023 14:56:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Tue, 24 Oct 2023 14:56:39 -0700 Message-ID: Subject: Re: history expansion - modifiers :h and :t - questions To: linuxtechguy@gmail.com Cc: devs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52242 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Tue, Oct 24, 2023 at 12:23=E2=80=AFPM Jim wro= te: > > print ${DirPath:h$N} > ^ does not work > Error message: "zsh: unrecognized modifier" Yes ... "$" is not a digit. Parameters are not expanded here. You can get around this with ${(e):-\${DirPath:h$N}} > I'm not sure if the following is an inconsistency or not. Man page for := t states that > 0(zero) is treated the same as 1. Should this also apply to :h? The documentation for :t is being a bit too literal. More accurate would be to say that 0 is always the same as having no digit at all. In the case of :t counting from right to left :1 is also the same as no digit at all, but for :h counting from left to right that's not the case.