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 27545 invoked from network); 23 Jan 2023 20:46:03 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Jan 2023 20:46:03 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674506763; b=mlD7sqVdzo/ICOGeu8jykmC/YLqnFV5xdVge+C/RrMlOXDi/eY6/aoc/ItsIyW9IV0RJR/xV6a 8tsH3RL/QwEAPseRVPJpC+ekZxMp6aG6QnoT37vzObMWErmdw3rcdqzBv4GOt7w7Ftw1U/OeBN 4EAC+DsYvvkgzxs/P5bdNP4j5CoM1J78sHf1ZY7Tp4DIqqgsw2ozZhCwH35/Jc1HXrayZTi8aX aoRNbgsD82Ip80mEQiC5CZkmD8dh9i9xxWUpNLTU5FaEhFOfWLPn2/ZAyOLer/kWflJxNrWcR8 eK0E3KBNiDBJ3HcjpqiJ6lDVQpz0CH/vU14iqrpSWD+sTA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f44.google.com) smtp.remote-ip=209.85.218.44; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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=1674506763; bh=4jjzNus8T+g0UHCP7aWeClw00GurQb+TnfV0xdbngLw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=Efck3Pj+bac2ypJ9L/UOhG/IUXWav5tM8i+EnONmgRyrqJf0Vd3OZpAarkuVgwDOIpMy99wVT5 qQo2Pe39Geo0wOK82qHy1fvlQjQf8lQc5zbQzZpa12c4oukHft/MDh/ei4hSzLBa201MreSsin buASpkzNAWVz3Satm6rW+9MbkWpzuXvTO0M+RpEXrwLYT9Hk0eZ21NGxG+m9V1HqZMPfqJSTgH n/0759eVebVCUXQlj2HNFWsA+w5poUVdO9Q9xCkGH/IB6ENEjmH9scxE+ptQyAm/DLuTICv3S8 aUVMnFIlqi+1yYZdt1OPwjX9+oEyVVwYCcLJvosAkM5Jpg==; 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:To:Subject:Message-ID: Date:From:MIME-Version: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=1hZ7QtmRA7DhArR0WYUX2bGdZgBVo9wSjT7Lo3QnH2M=; b=OOydyyp3ArBFu4ypKBJ6mmXGLV YCx6DbKY/eB/EseNII70MqeNf8y7RSwYMz8+eTGEq6G7B5X9+x6ky2eIKfNfz1xGbMzmmwyd/kCbQ b8Lo7GXcOZ2C+C3bdhq8PZXSm6xDeFu9vL5u3yEZoJGCX0i9GjzveD67Px3+K0i88qS9Ax6AdTJQO jo6TUyepe51AybRXz3gg0dyM3umsfHNCukcwXw45knbOnlsOV1IWrWY0EI4zLU1OVFgtAmEr1Iz52 N7aBU8o+CtMoedJ6TjmRyxA+zCTK78b2qJ7oaNbNFUendAbceqTTQuz/2HrqwUfNu+CPNCngY35Dn ggrx/Ldg==; Received: by zero.zsh.org with local id 1pK3hb-0000Mk-0M; Mon, 23 Jan 2023 20:46:03 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f44.google.com) smtp.remote-ip=209.85.218.44; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f44.google.com ([209.85.218.44]:39672) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pK3gt-00002W-ND; Mon, 23 Jan 2023 20:45:20 +0000 Received: by mail-ej1-f44.google.com with SMTP id v6so33821521ejg.6 for ; Mon, 23 Jan 2023 12:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=1hZ7QtmRA7DhArR0WYUX2bGdZgBVo9wSjT7Lo3QnH2M=; b=Q8PKbY3VJwBPtidMwOpgfx6HX5HE+ZxBsHJOlcZZAUkFePneEZ4uHnKKVyesIa9xrF 51tHh9u2VUtQfGxPW7aNFgi/AXdGPlWyCSaWbE/sy5WACxUebzIrQSezmbgm/FboRN1l eEblWE21QQv9J94Ws68w/3fQq4edHFLgCQ62LF172srHg16r/Xqialbq9JKSDKbyTFXk +J03BCFMxa+TYZn6Kpw2y9AKbzhB0M8grnYX5owk71QNhfsU/KQT5jDfclA5cPUrVFc3 Jqutifwd+Wx/rCnqsi4y4UvzPOmJdQ1zQSxcXoA/KzOFAQuU24c6YOqfAR231UEfsGpY FVmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1hZ7QtmRA7DhArR0WYUX2bGdZgBVo9wSjT7Lo3QnH2M=; b=DnqNzMLpA3wJrFBhCRwaZJgFoMig24qZYAjAaKk4ICRfwfHYfE8bUZ6RA7lfdvbZzz DAVtXmbqVs7vpqdfbp1/qrWkRJvAAKn28JzIWOm/CHKJ4Y2ROO2QOGQMJsj3AoU08rZi GWt7+e7wk1bBawL9sub/WfJPh61rS1aZcP2/lw+j40a521/7clgZUjAWftqv518XtMEx wyKOJwIlbovrnMYVbGQhP1UdySxuYJKCgQ5CwZiMCMKWUsLQXKv6kBpzWWzfAitCKDly +38+qkYH20m/hFgGr8VpjaX8YpWv4/V44lsXeQnY/VP8/rwcl7njxPOlPF9MzPzV/RUg 2w0g== X-Gm-Message-State: AFqh2kq2PnAZ3rnBkufFCefVsfum1gn0s5C55prru/RFk7zorpxVIiUP fdhoeoGF9y/r8jVHvZtUsow/VMubUk6Cepi1nKXl97KPldd7hb8t X-Google-Smtp-Source: AMrXdXvxg8eeurChMT+y4KwSjSzeW/X4eaJ1eZDe7ac1K25EAcdFEIsP832XQeSUC6hbgcVAfbJCaqDn/YdMGiBtE2w= X-Received: by 2002:a17:907:2109:b0:871:cf35:11d7 with SMTP id qn9-20020a170907210900b00871cf3511d7mr2670766ejb.597.1674506719067; Mon, 23 Jan 2023 12:45:19 -0800 (PST) MIME-Version: 1.0 From: Bart Schaefer Date: Mon, 23 Jan 2023 12:45:07 -0800 Message-ID: Subject: Bug (?) with ${(M)NAME:+WORD} and ${(P)NAME} To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 51324 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: This works: () { local foo () { print ${(Mt)foo:#*local*} print ${${(Mt)foo:#*local*}:+LOCAL} } } This does not: () { local foo () { print ${(MtP)1:#*local*} print ${${(MtP)1:#*local*}:+LOCAL} } foo } No alternate nesting of (M) and (P) gives the expected result from :+ The (t) there is not the issue, the same thing happens with: () { local foo=xx-local-xx () { print ${(MP)1:#*local*} print ${${(MP)1:#*local*}:+LOCAL} } foo } Am I missing something?