Skip to main content
edited title
Link
Michael Mrozek
  • 95.8k
  • 40
  • 245
  • 236

ZSH: `ls *(.)` lists regular files only but `ls *(\/)` does not list directories only

Source Link
Amelio Vazquez-Reina
  • 43.1k
  • 81
  • 211
  • 300

ZSH: `ls *(.)` lists regular files only but `ls *(\)` does not list directories only

I'm not sure I am using ZSH's globbing correctly, but I thought ls *(/) would just list the dirctories under pwd, but it doesn't, it recursively lists all files under every directory under pwd (I got the statement from this list of useful zsh tips)

What would be right globbing for exclusively listing the directories under my current path?