From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id B212F23D61 for ; Sun, 5 May 2024 08:30:07 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1714890607; b=mtN52O3g4yIByflLlKo/SkATWs0gNtZnuJEa792OIuASOhr/VCfPBeT3gbqbQqi/mDfNlznnT/ yekcXYR2ZZrPDEVaE1JCODZt0SL0WcHkeQGbSQ/1puvAB+hn7PYJ4PgYnANuQZKP3bQf6FTjBC cIVNNc/O+Lu+KDS0vVctxk0koxXrOLM2X1eF4mV/tpn4udqKCPyKdNKPGZAHssofXAPQ3ek86o MH4UWzkgRzZVdXzS03TD2w/6TJ+yvoYNWUqVJrTuSjMQCUJ/w8J0SOHW8wr437Y4zPsbAC5T3C ALeDByxNhgpvwrfgr2zPs3SdpMMl8whe0kJfJp2Ewt8bnQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oa1-f53.google.com) smtp.remote-ip=209.85.160.53; dkim=pass header.d=awkwork-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=awkwork.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1714890607; bh=J9AhkXfKO8K8tGOarp74swlSfyFMd9/510lu0H8Wx2s=; 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=UA6BLiws8En9eWRBOONDs4RV49UNjbIgPUgPXXmuQz9otM8y4OZKzgTFwAkosZGrb4D386y8wM H6gnN5Ei8UMjGCgIrhT59N8dIEXeFkEdk5elhp4DoZJHjVnOPoALQDuEeLCqGDp7sV0cKqM3IE XoOIFi25rxhLe66O6jONkAeR9dt4o0LwadEXeIVNokra1qIK6+tRXDDjowz/NKwnuyL/GLUjf4 ubOTKsxKrUgdUL9I029iAtFrqFc+GaR6WcXnImFtirzespx1yD2efeiwLoPBpDZs8Gqr22OB82 i0mCN+4V3BirWLrz9XGVXuVtgCNWMTK80xgJa3pMAxfYbg==; 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=7c4wjqRTtHEbdZJW2ul9p5xOjrTKI/+Zj6Olar/ccAQ=; b=j/m1QiIuyEoO7jZhAXvVjIEvhX YObVanvZA0aCuKnczVxf2O5SiDeLQObS30jk60KV4bTnSrQ8K3POM4UCWJACYHfG4QmqVE2xXfZWh euuNPnE61wv4G2OUjdxzTTH54DVkmIIFhwKZyeviPvJQcWT8ktZ2uyQRSNSUP2vGuTx1hu3X1N4zX QKFA9Ekpm60rnvICQlo3DTnPH5kh3QMBFJ8eVcarEbWc64iDnpeiH/y0LwRl0+NvxtdvnJzzGR68Y oHMqB2BVwm3COdDrbGC015eW022eTgyKYnMINiR6lKW/7v2FWqkhtRK/G0MBYRsbDoOm++kUUDXpu VkTuhlbQ==; Received: by zero.zsh.org with local id 1s3VNu-0002nk-LF; Sun, 05 May 2024 06:30:06 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oa1-f53.google.com) smtp.remote-ip=209.85.160.53; dkim=pass header.d=awkwork-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=awkwork.com; arc=none Received: from mail-oa1-f53.google.com ([209.85.160.53]:46216) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s3VNg-0002Tp-CC; Sun, 05 May 2024 06:29:52 +0000 Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-23f2996b634so272653fac.0 for ; Sat, 04 May 2024 23:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=awkwork-com.20230601.gappssmtp.com; s=20230601; t=1714890591; x=1715495391; 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=7c4wjqRTtHEbdZJW2ul9p5xOjrTKI/+Zj6Olar/ccAQ=; b=NQ2nldJOSILrPZ0l6OC6YqHSAnTyLszZIOv47d3m3k+aYCAjG9fCKJfmyTOWciJQiM Ctbqz3e+jjkyTPcZJHRPTz37vuUuqwh+W3UXrFC7sfLE2JnpOLMVqpHTlBcEOweVjiEs MF7rdNtXrcLL0GsK7+GqV1FVMtctETOWnkHdBDndnR+40be0DJVT4zKQgo+3mTqQG8N+ OrDFbCx+TDC7bQF20VeI5PvcH+rPJHY+aZz9EvAuOO3jr/FtPlwNljSQxw8SFbtXKvbb OnksNswnWmaJplT/SVtxq8n91dDhGETi3NhgQQtnNU0LGX6gxrr4nURgEcAWKfR7QlcL cmeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714890591; x=1715495391; 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=7c4wjqRTtHEbdZJW2ul9p5xOjrTKI/+Zj6Olar/ccAQ=; b=Seds+bZLRMOy6Mh4c3eO678QCfuLiA5YvqdsYpg/0cVtZXb998V5ph6JFCJiWDM4We Q9kVxJkU8lnGRIp8Qwsl3Bym5vHUFS7Z66F9W1PVlru0nIlZrCrhsN2UAceJUjQUg4Oj 50rFtKClaGFxzmDEqiZOEBbaI6uX0XS0QwM/Oqf+SeMHCboUf4hqk/oSSYGkJMXqPgXu DJRB23nBvur15ek0uNc1iAd8xrBZw1Ho+qjkb8a/DblqFEVby7AL61gBWgy4O7CHCqfT H9Dxjw00+tuNM66B1Klolpium53wbyMBjFpTcjBPsBw1QYh/YqvPsustFHKSp2vSLvCs 3pGg== X-Gm-Message-State: AOJu0Yw2GZ3XhsAPDTLUZMPSUtuHYTg1lfVeEkZLgaP7JM2yTtNddfqB y1w3WOjAMzKloTMCRHSkIh+WquBZxPPyTZhSWzA1/TQgPrLXvfDNKXOJ+WfGUPt//OGa5Xwx/9b /zZh8c4LW7Bf23if6wBtWs3BN9T8LdN3ZVs8sFOfXVDAqej47ZDg= X-Google-Smtp-Source: AGHT+IHo+fomTIUC5WzssFzibGws4rdf3cuBrmjZhIv9YCl8XWfoo8/k+7G1ZXo9h1d1vaURq1klI9XLlZsnu94N5Dk= X-Received: by 2002:a05:6870:1851:b0:22e:8002:63f1 with SMTP id u17-20020a056870185100b0022e800263f1mr8323260oaf.8.1714890590691; Sat, 04 May 2024 23:29:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Wagner-Krankel Date: Sun, 5 May 2024 01:29:24 -0500 Message-ID: Subject: Re: Inconsistent behavior with comparisons and recursive glob patterns To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52913 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: I dug through StackOverflow a bit to see if I could find how folks in the wild were expecting zmv to work. Interestingly, most of the posts that called zmv with `**/` and '$f' were by the same author. In one if them (https://unix.stackexchange.com/a/271816), they explicitly stated that "zmv '(**/)(*)' $1$2..." and "zmv '**/*' '$f...'" were equivalent. In the absence of a specific statement in the documentation about '**/' and '$f', it seems safe to assume that the intended spec was that '**/' would behave the same with the various zmv flavors as it does in other situations. Thanks, Awk On Tue, Apr 30, 2024 at 3:09=E2=80=AFPM Bart Schaefer wrote: > > (Moved from -users) > > On Tue, Apr 30, 2024 at 11:15=E2=80=AFAM Bart Schaefer > wrote: > > > > I suspect there's no explicit reasoning in zmv. **/ is specifically > > handled in the case of zmv -w/-W (workers/27247) but not for '$f' > > placeholders. > > > > It works if you do this: > > > > zmv -n '(**/)f?' '$f.txt' > > > > Whether it should also work without the parens and also without the -w > > option is unclear. > > Attached patch makes it work without the parens. Is this within spec? > It's hard to tell from the solitary '$f' example in the doc.