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

Re: assigning parameters and globbing



On Apr 5, 10:24am, Peter Stephenson wrote:
}
} I'd probably use an intermediate array.
} 
}   local -a files
}   files=(*)
}   export BLAH=${files[-1]}

Also, arrays can be placed into the environment of builtin commands,
even though they can't be exported to the "permanent" environment that
is shared by external commands.  So this works:

    files=(*) eval 'export BLAH=$files[-1]'



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