Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: script != commandline ???



meino.cramer@xxxxxx writes:

>  I fear, I miss a basic information about zsh and scripting...
> 
>  Giving
> 
>     print -l **/*
> 
>  on the command line gives me everything below `pwd` -- including
>  all "hidden" files and directories and their contents,
> 
>  A script:
> 
>    #! /bin/zsh
>    print -l **/*
> 
>  only prints the not-"hidden" directories and their not-"hidden"
>  contents.

You need 'setopt globdots' to be able to glob dotfiles.

I suspect you have 'setopt globdots' in your .zshrc, .zprofile, or
.zlogin.  Which are not read by zsh scripts.  You probably either want
it in your .zshenv or in your script.

Phil.



Messages sorted by: Reverse Date, Date, Thread, Author