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, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4340 invoked from network); 18 Aug 2021 13:12:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Aug 2021 13:12:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1629292334; b=BLmIJdkJ6/1egVX5NR5RK13syhoQMG8/BbJTeGml41yLnmO5EBcFOld04n7D2iWc3/CIZvpB0a 2g+fjPMgYABt12+/vgGp9uOjrFsqOv6ha+U+y2U0YssYKQYfZXUr8fbgVhEQGWG8ql/+fxj82d TA/IRqpNxe4W8NwfqNTtb+bSm+5DvqCNDybSLuMo48JewTKIND3Du0QpnGlyD9LtK1MZlxHTG6 Dcv3U1bqNN4eYVCMep3kropki/oKaficvtTpAJHh6fXqEycrHGsPxLddlXvX3PiMR59BNmkzp1 JJcAQXhoz7jaa1xNXUY+xLyMdxyM5CPA+n27qjG8F7w7VQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wm1-f45.google.com) smtp.remote-ip=209.85.128.45; dkim=pass header.d=gmail.com header.s=20161025 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=1629292334; bh=OFI3qqXqIcoOWM5p1VW/+vGT26JYuaBNojFJ+Y0LC5E=; 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=Nt9Nfq8p0QT+rjYLEEH34IyF8ujHIK2bCttm91DlwoC4zH6ouIp+KOxgO9VddPGK92SaWiyOFZ atbamEok+OZ3xiXJ7rFGvkCi8CRKWQ1ZTPa7CXFJoFkFcHVFQnLnxVyflqJn0Kwp+aLu73Pbkw 5WCT3lk000LcRZTrzqG14JFXlcauHdFXIxO7iCt2DuoeNwGzRQUJLLEIUSSibTO7FP3BBmdDCc /rtgpIxK3TWXLfWhUzd+VkBs5yS2UEDfHafafo9C0OKPjVZKZw43QfEGiPtq37o5FH/7jS/JUO BQm7WJTxuaY6UI1DcbOo3KmSCMiO8eCACm8jkF32sycS+w==; 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=BRK3Lj2Q+k+A1PvprVtZ+BdKLS1bql8n4HMuYV1hUas=; b=Qm5JxnE+xZQnoXbBQYPvjq/hMm Q0+ddw/efgqF2CeVHux3/BAG9DmXoDI8G4c1CSrMfKnx5FrqBxGqLTFm4/AleddzAdjs9LxDaShf9 /IU5V308vKFdWg8bP7ZBe24hcXw0HKavc0Jge6s09qtNOJ8V4t76a/uCuWfj3++o2j44dFOxELge9 NWw5A5DXN30YsaLeZ3FzHEoonpKGhGG1RCM/rqCjKsxgRbYv9NqyGItRtibE0ih2nf2cnjT/uUo+c lHHHcNAeYjjkncNb8usUffK1AblDVfASzeS2snE0AlquiCVbmfp+w38HB3qgiuEsnvfK/jomQjjFN D6oerMHw==; Received: from authenticated user by zero.zsh.org with local id 1mGLMa-0002Dv-Ok; Wed, 18 Aug 2021 13:12:12 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wm1-f45.google.com) smtp.remote-ip=209.85.128.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wm1-f45.google.com ([209.85.128.45]:45745) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mGLLY-0001VG-0i; Wed, 18 Aug 2021 13:11:09 +0000 Received: by mail-wm1-f45.google.com with SMTP id j12-20020a05600c1c0c00b002e6d80c902dso1741981wms.4 for ; Wed, 18 Aug 2021 06:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BRK3Lj2Q+k+A1PvprVtZ+BdKLS1bql8n4HMuYV1hUas=; b=nX8fHzNRy5+Q/nRsnexFJEzcmjNcKAWqpV6+fZpgqOEXv7qBxvVgIVFoDB36XnKYrq B53CpIw92Q5a3xV53LUVSi8raaMq4IXHWpC6bfPvCD/GpEIX2md/OAvprmPiRfVZXaeT 6/fXSm0M6cBsX5H0MKswGnfo6kcL+zRJYMcktrQp0kAQ8OcQVmu5m/MHwrGIDvdHE8KQ VZptik6DdHDSTUhoG86pzBDuJCLSkzWlsP8A05cNGs+JUHxEpvcDqSXtokzb4OZOp/Qd Db0/C93dn/q0dTI8HQgMJk7qiS0HZ30PCBQk8tcMwIvSCWdGFWDONJLB/KPl5CRQSYfJ a9Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=BRK3Lj2Q+k+A1PvprVtZ+BdKLS1bql8n4HMuYV1hUas=; b=VZF4yJIKUZveYlPe9UsMyb4NBghfHLDGvvY0E9epFXk8lojZlx8KSaO+KV2PAZdgIF KE4GRwk3+eVKfQcOfVnKLETwIGe0XC3hRRX0gJx1DJhC1n0U+6poYuuq8GczvATAU6cm luEI/6AG40r7m6U+6Q2rYFg/v7n6FHqjaNxzSVrQ+BFXvjcS3Yw/G4ec6uiiGlEqS6r6 NAjfFsL/kwL2mSPz0t0xLY/hvHwX1MmHJfjNHgjcS5IoZngxkFd0TfXD23QostOl0r6K k6/6RSTMY/0IYpPSjxE6wXZFRw0+HQOJd8nmh+ZpqkyLaXoHoggVqAMWse6ogfU9IBR9 qtSg== X-Gm-Message-State: AOAM531fQJaBBlZa1qmY3IfOU1T/ZlJh4eZ5qZa+zki7RHUHTjlGHpQ5 U9VPT/MywtExSmTFI2jDdVj22am7C43K/aor7ASFHT3oHYg= X-Google-Smtp-Source: ABdhPJxp0iPEki+0yPS+rh6VqM36GN20WS1Opg2cHRzwvBrsI7KfKqPuOs+RSCKVjGNb4GYICH16M7cAvrsOc+ujkOE= X-Received: by 2002:a7b:c756:: with SMTP id w22mr8413325wmk.169.1629292267222; Wed, 18 Aug 2021 06:11:07 -0700 (PDT) MIME-Version: 1.0 References: <8e20a9ea-d705-4a1f-97ca-ff6b809f6a92@www.fastmail.com> In-Reply-To: From: Zach Riggle Date: Wed, 18 Aug 2021 08:10:56 -0500 Message-ID: Subject: Re: Globbing symlinks-to-${glob_qualifier} To: Bart Schaefer Cc: Daniel Shahaf , Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 26950 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: > That'll be =C2=AB*(@-/)=C2=BB and =C2=AB*(@-*)=C2=BB respectively. Thanks for the info (and hello to France!) Definitely easier to read and reason about than *(#q-.)(@) > Under the hood, =C2=AB-=C2=BB simply flips between testing the results of= lstat(2) and stat(2). Ah, that's useful information! Love these implementation details. > Not an error; just zero matches. That's not the same thing. You're definitely correct, my mistake in terminology. I'm lucky that I got "qualifier" and "modifier" correct (I think!) > It does become an error when NOMATCH is set That's neat! The "error" that I got was just '/bin/ls' complaining that there is no file named e.g. '*(@/)' since the glob didn't find anything (and I don't have nullglob or nomatch set). For me, it often helps to employ Python to see exactly what's being passed in: $ python -c 'import sys; print(sys.argv[1:])' *asdfasdfasdf* ['*asdfasdfasdf*'] $ python -c 'import sys; print(sys.argv[1:])' *(@/) ['*(@/)'] $ python -c 'import sys; print(sys.argv[1:])' *(@-/) ['pwndbg', 'pwntools'] Turning on nomatch does indeed throw an error from zsh. $ setopt nomatch $ python -c 'import sys; print(sys.argv[1:])' *(@/) zsh: no matches found: *(@/) Interestingly, it appears that nullglob takes priority over nomatch. Yet another "Today I Learned." $ setopt nullglob nomatch $ python -c 'import sys; print(sys.argv[1:])' *(@/) [] Zach Riggle On Tue, Aug 17, 2021 at 11:03 PM Bart Schaefer wrote: > > On Tue, Aug 17, 2021 at 8:58 PM Daniel Shahaf wr= ote: > > > > Zach Riggle wrote on Wed, 18 Aug 2021 03:27 +00:00: > > > $ ls -lad *(@/) # Error > > > $ ls -lad *(/@) # Error > > > > Not an error; just zero matches. > > It does become an error when NOMATCH is set, but not because there's > anything illegal about writing that qualifier.