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

Re: Help on filename generation



On Tue, Jul 10, 2007 at 07:10:46PM +0100, Peter Stephenson wrote:
[...]
> doit() {
>    for file in $1/*generic*~*\~
>    do
>      print $file
>    done
> }
[...]

Let's also note that print expands its arguments without -r and
you need to mark the end of options:

doit() {
   for file in $1/*generic*~*\~
   do
     print -r -- $file
   done
}

-- 
Stéphane



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