|
[Sponsors] |
[OpenFOAM.org] OpenFOAM 4.0, bad option -t in zsh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 31, 2016, 07:16 |
OpenFOAM 4.0, bad option -t in zsh
|
#1 |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
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 type [-afptP] [name …] Code:
type [ -wfpamsS ] name ... # Equivalent to whence -v I'm not a shell ninja, but anyone among you knows a cross-platform solution to this bug? |
|
November 1, 2016, 09:02 |
|
#2 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
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. |
|
November 2, 2016, 10:46 |
|
#3 | |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
Quote:
Code:
[[ "$(type wmRefresh)" =~ "alias" ]] && unalias wmRefresh || unset wmRefresh |
||
December 30, 2016, 13:10 |
Working in zsh shell
|
#4 |
Member
Arvind Jay
Join Date: Sep 2012
Posts: 97
Rep Power: 15 |
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 if declare -f wmRefresh > /dev/null then unset wmRefresh else unalias wmRefresh 2> /dev/null fi |
|
Tags |
bash, openfoam 4.0, openfoam-4.0, zsh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Wrong multiphase flow at rotating interface | Sanyo | CFX | 14 | February 7, 2017 18:19 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |