According to ShellCheck's documentation:
In the original code, the return value of mycmd in $(mycmd) is ignored,
and export will instead always return true. This may prevent conditionals,
set -e and traps from working correctly.
Related: https://www.shellcheck.net/wiki/SC2155
Related: #470
These occurrences do not cause any problems described below but it's better
to be verbose that we indeed want to access the first array element.
According to ShellCheck's documentation:
When referencing arrays, $myarray is equivalent to ${myarray[0]} --
it results in only the first of multiple elements.
Related: https://www.shellcheck.net/wiki/SC2128
Related: #470
Update the *Source script in modulefile* cookbook recipe to add it a
*Usage with shell-specific scripts* section that demonstrate how to use
modulefiles with `source-sh` commands when software provide a specific
initialization script for each shell it supports.
Take this opportunity to improve the readability of this recipe by
coloring/highlighting shell session examples.
Fixes#399.