Commit d93c0379 authored by Henry Weller's avatar Henry Weller
Browse files

etc/config.sh/aliases: Use 'declare' instead of 'type' for bash/zsh compatibility

Resolves bug-report http://bugs.openfoam.org/view.php?id=2333
parent f3b16763
......@@ -70,7 +70,13 @@ alias run='cd $FOAM_RUN'
# Refresh the environment
# ~~~~~~~~~~~~~~~~~~~~~~~
# For backward-compatibility unalias wmRefresh if it is defined as an alias
[ "$(type -t wmRefresh)" = "alias" ] && unalias wmRefresh || unset wmRefresh
if declare -f wmRefresh > /dev/null
then
unset wmRefresh
else
unalias wmRefresh 2> /dev/null
fi
wmRefresh()
{
wmProjectDir=$WM_PROJECT_DIR
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment