Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cml invocation vs script output diff
- X-seq: zsh-users 26343
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: jdh <dhenman@xxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: cml invocation vs script output diff
- Date: Thu, 7 Jan 2021 15:51:37 +0000
- Archived-at: <https://zsh.org/users/26343>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-01/20210107155137.GC25249%40tarpaulin.shahaf.local2>
- In-reply-to: <20210106184613.19412@binki>
- List-id: <zsh-users.zsh.org>
- References: <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author