I write scripts which don't need to be portable using Zsh, and I find it very useful for interactive use too. If I'm handling a lot of files/file formats, the parameter expansion flags are very useful:
for i in (#i)*.png~*orig*(oL); convert $i $i:r:l.jpg
That's a (#i) case-insensitive match for ∗.png, but excluding ~ files matching ∗orig∗, and (oL) ordered by length/size.
The $i:r strips the final file extension (i.e. .png), and the :l downcases the filename.
x=( DSC_<0450-0630>.JPG )
some-command -A${^x}
Runs: some-command -ADSC_0450.JPG -ADSC_0451.JPG -ADSC_0452.JPG …
x is set to an array matching files like DSC_0500.JPG, where the number is in the range 0450-0630. The -A${^x} expands the array, prefixing each entry with -A.
ls -l **/src/**/*(.x)
Recursively list all plain files (.) that are executable (x), and where the directory "src" is somewhere in the path.
Have a look at "man zshexpn" (then "Parameter Expansion") or [1], then "Filename Generation" further down. 30 minutes reading this is worthwhile for anyone who uses Zsh regularly.
[1] http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parame...