###--------------------------------------------------------------------------
### Utility functions.
+## File descriptor assignments:
+##
+## 0 -- original stdin (never touched)
+## 1, 2 -- stdout, stderr, redirected to 3 while running comamnds
+## 3 -- original stderr (verbose), or logfile (quiet); captures command
+## output
+## 4 -- null (verbose), or logfile (quiet); primary diagnostic output
+## 5 -- orginal stderr; secondary diagnostic output (with colours)
+
exec 3>&2 4>/dev/null 5>&2
notify () {