mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support alternative values in string expansion
- syntax as per Bourne/Korn shell
${parameter:+altValue}
If parameter is unset or null, nothing is substituted.
Otherwise the \c altValue is substituted.
This commit is contained in:
@ -43,6 +43,8 @@ int main(int argc, char *argv[])
|
||||
" $HOME kjhkjhkjh \" \\$HOME/tyetyery $; ${FOAM_RUN} \n $; hkjh;"
|
||||
" $(DONOTSUBST) some other <${USER}> with '${__UNKNOWN:-some default}'"
|
||||
" value "
|
||||
" or with '${HOME:+Home was set}' via :+ alternative"
|
||||
" or with '${__UNKNOWN:+unknown}' empty"
|
||||
);
|
||||
|
||||
dictionary dict;
|
||||
|
||||
Reference in New Issue
Block a user