OpenFOAM 4.0, bad option -t in zsh
Hello everybody,
I'm in the process of passing from OF 3.0.1 to OF 4.0. Meanwhile I also changed my shell from bash to zsh + OMZ since that is the shell I naturally use on my personal machines. I'm experiencing a problem with the initial setup of the environment, in particular: Code:
source OpenFOAM-4.0/etc/bashrc Code:
OpenFOAM-4.0/etc/config.sh/aliases:73 bad option -t OpenFOAM 4.0 OpenFOAM 3.0.x in the new version we have: Code:
[ "$(type -t wmRefresh)" = "alias" ] && unalias wmRefresh || unset wmRefresh bash Code:
type Code:
type [ -wfpamsS ] name ... I'm not a shell ninja, but anyone among you knows a cross-platform solution to this bug? |
Just replace the line that includes the -t option with this one:
[ "$(type wmRefresh | awk '{print $4}')" = "alias" ] && unalias wmRefresh || unset wmRefresh I found the answer here. |
Quote:
Code:
[[ "$(type wmRefresh)" =~ "alias" ]] && unalias wmRefresh || unset wmRefresh |
Working in zsh shell
Here is the update on this.
Replace this L73: in etc/configh.sh/aliases : Code:
[ "$(type -t wmRefresh)" = "alias" ] && unalias wmRefresh || unset wmRefresh Code:
# For backward-compatibility unalias wmRefresh if it is defined as an alias :) |
All times are GMT -4. The time now is 23:33. |