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=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_SBL_CSS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 17563 invoked from network); 7 Jan 2021 23:10:08 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Jan 2021 23:10:08 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1610061008; b=v0QfxPxM5GnTAovXp7kTT1E/Di0Ad0hHbCuc/ENZXFF2IvP1vYvfNPnKxUt+5oyzHYUE8kLp6g 5VCLJSs0Rp2wg+0T6lLXtLBQ7lMUN0tdI04br/XRhVF8TsEdmThOSebi8FIN96MWJ6o9ksSWn6 Zz3e+dTnzALBVHy8FoKHS9yikunGxVI4l2/jJ6uDAJW2rFMrR0G13ECzoYGsTMLS9Dz0hMCG5S 3hgEKNIUDquZ4e83DvXCUNtCwHbdmCO/d/+TGTS3Y1/92JUqZFgL2MlipN9bZ1rmAiinQpUbs5 D4xx+59oOX0q6/Q9u9dfJfA8Ywv4I5P+7Fj+Ei8iCJUv4w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pg1-f177.google.com) smtp.remote-ip=209.85.215.177; 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-20200801; t=1610061008; bh=eOE55qpg2Bh9Kbj+ZqVMwD9mLiEwlrFUoE3xMJaqafI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:From:Date:References:In-Reply-To:Subject:Cc:To: DKIM-Signature:DKIM-Signature; b=BXzCaNS13RlZmZVbObQddu3BqRE0qazp2S3KCqpZd2QlEfcf5wqVJpeAlLoCNAGNMFhfN/Tu8U 1AkEYhpMzckj6ntccn74VakW+KuLT+1lNFqCwgRT20Lks6ZbzlhY3Ru3vtK9TWG5YNw5LFFz5N QcGzQWIh1xkVsLlSZsC6V+WcZ9z76f2Rymn15LszT70YrIGP3mtjtzoPtNBy/ujH62EzQcpwKk K+tfh+q9RZlI5Y7Fo0PZMVWaS6CtISgXQbSSr6FdM03XFRxq8yFaSiJ5YWmRcuy2h9EgKT1Og9 RV++dZcBnKixcXqmXEn9x+7Dw4soO3AhydDDp/ztSYHCHg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:From:Date:References: In-reply-to:Subject:Cc:To:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=0HB1k8l3w71H4FqV15rb3kCzxCFYfXKTQXk0LdSGpgs=; b=mqHXrIbBkoDLmYekQ0/T68jB95 jBBiSj8ntzZiP6ADkazk/J7ulV8Jm1yOs6Ku1oYC2KYxUvyga0z7A2ko0tWQPvk7z9NfHQ7dbCmB8 Fg92euVK9igs6sOakCKt37v9x8Qnn4kbD/Nw2hAm5PdQvKkVfev51vVnCR+cxHgjf/64H5A+LppKp 2iyvdJOtEOrEP1K+7j1ZecpLIxXEMFPmG1zMp9rWSaVImYp15To12PwsTMIoz6pZcV+KWjLVcArfK LuPexmKdKYMYmD8UTQiQUzdayEP/pVIKOn5GrlRxKhX8ST6urVHnIcogssDL5x6hDXg+6TJmrjZwK aZxUKtQQ==; Received: from authenticated user by zero.zsh.org with local id 1kxePv-000LAt-UU; Thu, 07 Jan 2021 23:10:07 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pg1-f177.google.com) smtp.remote-ip=209.85.215.177; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pg1-f177.google.com ([209.85.215.177]:39333) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kxePP-000KnW-RS; Thu, 07 Jan 2021 23:09:36 +0000 Received: by mail-pg1-f177.google.com with SMTP id 30so6361298pgr.6 for ; Thu, 07 Jan 2021 15:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:subject:in-reply-to:references:date:from:message-id; bh=0HB1k8l3w71H4FqV15rb3kCzxCFYfXKTQXk0LdSGpgs=; b=b9SKCX6a2tneVM8WNbsQLzblz3trHfa1EUxW83c0HIqRBIqd1D6RZVmCZPHultF4hm gpmZ0O/4asN8wuUi+3D087h1RI5epc33PXGY3BFxRXjGFvWGxZiCCmxRRtA5EhsmHGYa TssZWtmsB8wcJlrpuYNeYM7ADYiuBGk9lhW9HUkwVp2PGUK+49onmBtMw0d+NPsmA5MS P+7HC3hAnV8gfTSMq0acc6BWPSKeoNY8wWI0e/NQxo9fWwQM9TTk2eLjAtSCfeC7gfqF ffxJ7zCWNUV8cHFitRG7vjk4+sYGfFfQy/cp0STcWlojGYHXdI0LB0I5QsTM1RD4lxJp XOcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:references:date:from :message-id; bh=0HB1k8l3w71H4FqV15rb3kCzxCFYfXKTQXk0LdSGpgs=; b=LGoa4GZDmI6IIC13CkweMNprrh1EH79wSeqM3JdmWRCJXT9gcdqSaiY3p/9PuZ6TFJ kVvtu6RU3XfgqbmThjwvbcuX0sDbbAYgvh0BA/8g0zyUAqJ3/+Yf/XtxIg3Ewt9XJ3tn uTj5u2HA3UvmyZOUu8KoqH1HRqBtwMX+5hkgtfRnJY8Bj7tjCXjeMAj3liXin5B5t/04 fHPtqd4nXpBvrkD2RD8gA3ERQqGBG6bHKLjPTkbAS6umJT/Qk61IuAhBEUIYw77rnQCG uQRqWe19DH9/l0VtXGdFU6AiCSOZj6lqcFFw3YgrBokJgrSTtn4YTSJ+Rd+v/Rhc0Fqr M2Pg== X-Gm-Message-State: AOAM53246+lCbo/ZbopSVmmFdNCnmoSiIodaPYtbuFYxG8Hr/QwNYnJG zPeII7IfblbbRUwmfoqb01jrT7rdQzw= X-Google-Smtp-Source: ABdhPJzM3CR4mkLYPEFLGgxrQ4vv+8ULPygbmFnBfbCm4g+hnD3x6LwLu4ghTig9eoZ/V3b2g8F/dw== X-Received: by 2002:a63:43c6:: with SMTP id q189mr3990552pga.245.1610060974566; Thu, 07 Jan 2021 15:09:34 -0800 (PST) Received: from binki ([172.58.35.9]) by smtp.googlemail.com with ESMTPSA id q23sm7351292pfg.18.2021.01.07.15.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 15:09:33 -0800 (PST) To: "Daniel Shahaf" Cc: Subject: Re: cml invocation vs script output diff In-reply-to: Your message of Thu, 7 Jan 2021 15:51:37 +0000 <20210107155137.GC25249@tarpaulin.shahaf.local2> References: <20210106184613.19412@binki> <20210107155137.GC25249@tarpaulin.shahaf.local2> X-Mailer: MH-E 8.6+git; GNU Mailutils 3.11; GNU Emacs 27.1 Date: Thu, 07 Jan 2021 15:09:31 -0800 From: "jdh" Message-ID: <20210107150931.7738@binki> X-Seq: 26345 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: Archived-At: Yes, you're right. It was due to .zshrc not being sourced from a script. Setting the GLOB_DOTS option fixed the problem. Thanks Daniel Shahaf wrote: > jdh wrote on Tue, Jan 05, 2021 at 10:46:13 +0800: > > > > zsh vers: zsh 5.8 (x86_64-pc-linux-gnu) > > > > > > Bug: Different results from command line, cml invocation, versus a zsh script file. > > Test case to demostrate this follows: > > > > I don't think that zsh is descending down into . prefixed directories in the script version even with a explict -a given as ls's argument. > > > > --------- > > > > mkdir .hiddendir > > touch .hiddendir/tilde-file~ > > > > ls **/*~ Recursively find all tilde ending filenames starting with the cwd. > > > > This above works as it should, but, > > > > echo '#! /bin/zsh \n ls **/*~' >lstildefiles > > chmod 700 lstildefiles > > ./lsttildefiles > > > > Doesn't work and returns: > > > > $ ./lstildefiles:2: no matches found: **/*~ > > > > > > This shouldn't happen. Why does invoking the same command with the same agrumetns from within a script and the command line differ. The script version is clearly not functioning properly in my opinion. But I can't figure out why. ? > > Probably your zshrc sets the GLOB_DOTS option. zshrc isn't used by scripts, > only by interactive shells. Diff the output of `setopt` (without arguments) > between the two cases.