Aliases may contain loops and variables
You just have to be careful to escape the dollar sign when creating and using variables inside aliases. For example :
alias flow.tasks.list="for file in ~/NOTES/LOG/TASKS/*.flow; do echo file \$file; echo '---------------------------------------------------'; egrep -h '^\*\* \[[0-9]' \$file; echo; done | less"
This produces the following output
/home/ychaouche/NOTES/LOG/TASKS/dns.www.ibm.com.12s.flow
---------------------------------------------------
** [1] dns query taking too long
** [1.1] query time
/home/ychaouche/NOTES/LOG/TASKS/download-podcasts.flow
---------------------------------------------------
** [1] see if savefrom.net works again
** [2] search for alternatives to savefrom.net
/home/ychaouche/NOTES/LOG/TASKS/erreur-certificat.flow
---------------------------------------------------
** [1] erreur
** [2] copy-heading.flow
/home/ychaouche/NOTES/LOG/TASKS/exploration-de-la-base-roundcube.flow
---------------------------------------------------
** [1] joins
** [2] requêtes sur la table contacts
** [3] cacher le mot de pass