From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: jdh <dhenman@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: cml invocation vs script output diff
Date: Thu, 7 Jan 2021 15:51:37 +0000 [thread overview]
Message-ID: <20210107155137.GC25249@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20210106184613.19412@binki>
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.
next prev parent reply other threads:[~2021-01-07 15:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 2:46 jdh
2021-01-07 15:51 ` Daniel Shahaf [this message]
2021-01-07 23:09 ` jdh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210107155137.GC25249@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=dhenman@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).