list.sh: only show headings when there are items to show
If there are no formulae or casks to show, then don't show the "Formulae" or "Casks" headings. This used to be the case when there was only the Ruby implementation, and continues to be the case when the Ruby implementation is used [^1], so we should maintain the consistency. [^1]: https://github.com/Homebrew/brew/blob/4a95077682ae5f342cf60ff181ebbcfb03d49117/Library/Homebrew/cmd/list.rb#L162-L170
R
Ruoyu Zhong committed
3bda513bc0844a81eba7b9825d09bae298596024
Parent: 4a95077