Skip to main content
2 of 5
more correct versions

*   Yet another way to achieve it is

 print *(/)

or

 echo *(/)

Update

*  A bit more correct version (as noted by @Stéphane Chazelas) would be

print -rl -- *(/) 

or

echo -E - *(/)

respectively to take care about spaces and escape sequences inside filenames.

*   Yet even more correct version is print -rN which takes care of linebreaks inside filenames by separating the results with nulls, for example:

print -N *(/) |xargs -0 -n1 -i echo cp {} {}~

which is a "preview" version of creating a backup of all subdirectories in current dir.