[Home] Zsh logo

match-mail

Zsh Wizard

Download match-mail Return to Examples
  1. # match-mail - match non-empty folders. Used in the COMMAND (-C) compctl.
  2. # Uses the shell variable $mailpathfiles set in ~/.zshrc.
  3. local folder=
  4. reply=
  5. for folder in $mailpathfiles
  6. do
  7. if [[ -s $folder ]]
  8. then
  9. # Add the folder to the $reply array.
  10. reply=($reply +${folder##*/})
  11. fi
  12. done