Bug: Missing crystal-clear warning for the requirement of bash >= 4.2 to enable bash shell completion
Hi,
Thanks to @wyldckat's insight in the following communication: https://www.cfd-online.com/Forums/openfoam-bugs/197310-possible-missing-tab-completion-ofv1712.html , it seems that a user, who uses bash --version below 4.2, may experience the lack of bash shell completion functionality for the options of OpenFOAM commands in version 1712 (yet not the completion for after OF commands, such as transformPoints -help > **system/log** (the bold part seems to be tab-completed)
. Moreover, this requirement was not stated in https://openfoam.com/documentation/system-requirements.php .
Quoting @wyldckat, under etc/config.sh/bash_completion, the following piece of code is leading to the alleged issue:
[...]
# Bash version is too old.
## echo "No bash completions - requires bash >= 4.2" 1>&2
unset -f foamAddCompletion 2>/dev/null
foamAddCompletion()
{
echo "foamAddCompletion disabled - requires bash >= 4.2" 1>&2
}
unset -f _of_complete_ 2>/dev/null
fi
Directly quoting @wyldckat:
It's a bug in this part of the script and they forgot to document about this limitation. They left the line "No bash completions - requires bash >= 4.2" commented out, which means that there is no visual indication that your bash version 4.1.2 is not supported.
Many thanks for your excellent work.
PS: IMHO, This might be important for those who use OpenFOAM in a cluster whilst they may not able to update bash version due to inavailable root access.