diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 1341894242..84155c4849 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -58,23 +58,6 @@ autoPtr turbulence ); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - - Info<< "Creating the unstrained laminar flame speed\n" << endl; autoPtr unstrainedLaminarFlameSpeed ( @@ -227,4 +210,8 @@ fields.add(thermo.he()); fields.add(thermo.heu()); flameWrinkling->addXi(fields); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 9dd4b6560f..0d4c403b13 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -58,21 +58,6 @@ autoPtr turbulence ) ); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); Info<< "Creating field Xi\n" << endl; volScalarField Xi @@ -139,4 +124,8 @@ fields.add(b); fields.add(thermo.he()); fields.add(thermo.heu()); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H index 10e1546584..19b655e21c 100644 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ b/applications/solvers/combustion/coldEngineFoam/createFields.H @@ -51,20 +51,8 @@ autoPtr turbulence ) ); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); +#include "createDpdt.H" -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" #include "createMRF.H" diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 85d26aed87..626e1652ef 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -145,22 +145,9 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" #include "createClouds.H" #include "createSurfaceFilmModel.H" diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index bc09358193..708cab0b42 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -71,24 +71,6 @@ autoPtr turbulence // Set the turbulence into the reaction model reaction->setTurbulence(turbulence()); - -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - - multivariateSurfaceInterpolationScheme::fieldTable fields; forAll(Y, i) @@ -111,4 +93,8 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H index 675aef3f5a..8e56e940fb 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H @@ -92,23 +92,6 @@ volScalarField p_rgh // Force p_rgh to be consistent with p p_rgh = p - rho*gh; -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - - multivariateSurfaceInterpolationScheme::fieldTable fields; forAll(Y, i) @@ -131,4 +114,8 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H index 3ad7cb7464..6f0c93cc5d 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H @@ -72,24 +72,6 @@ autoPtr turbulence // Set the turbulence into the reaction model reaction->setTurbulence(turbulence()); - -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - - multivariateSurfaceInterpolationScheme::fieldTable fields; forAll(Y, i) @@ -112,6 +94,10 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" dimensionedScalar rhoMax diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index 8079428225..9d2307d418 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -56,21 +56,9 @@ autoPtr turbulence ) ); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); +#include "createDpdt.H" -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" #include "createMRF.H" diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index 1b54f4a912..0c929b3ffb 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -50,7 +50,6 @@ autoPtr turbulence ) ); -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" #include "createMRF.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index cc0bc64f0a..d4f6eb54e7 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -73,22 +73,6 @@ p_rgh = p - rho*gh; mesh.setFluxRequired(p_rgh.name()); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - label pRefCell = 0; scalar pRefValue = 0.0; @@ -113,5 +97,9 @@ if (p_rgh.needReference()) dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho)); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" #include "createRadiationModel.H" diff --git a/applications/solvers/heatTransfer/thermoFoam/createFields.H b/applications/solvers/heatTransfer/thermoFoam/createFields.H index 3a217895f6..90f25a89a3 100644 --- a/applications/solvers/heatTransfer/thermoFoam/createFields.H +++ b/applications/solvers/heatTransfer/thermoFoam/createFields.H @@ -37,20 +37,8 @@ volVectorField U #include "setAlphaEff.H" -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); +#include "createDpdt.H" -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" #include "createRadiationModel.H" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 4e4f45e721..f97d5af51e 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -115,22 +115,6 @@ autoPtr turbulence // Set the turbulence into the combustion model combustion->setTurbulence(turbulence()); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - volScalarField Qdot ( IOobject @@ -145,6 +129,10 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" #include "createClouds.H" #include "createRadiationModel.H" diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 0159cdba15..6ecb8c7e44 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -69,23 +69,6 @@ autoPtr turbulence // Set the turbulence into the combustion model combustion->setTurbulence(turbulence()); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - - #include "readGravitationalAcceleration.H" #include "readhRef.H" #include "gh.H" @@ -148,6 +131,10 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" #include "createClouds.H" #include "createRadiationModel.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 2da47d4ced..ce7e5441e0 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -96,22 +96,6 @@ autoPtr turbulence // Set the turbulence into the combustion model combustion->setTurbulence(turbulence()); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - Info<< "Creating multi-variate interpolation scheme\n" << endl; multivariateSurfaceInterpolationScheme::fieldTable fields; @@ -135,6 +119,10 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" #include "createRadiationModel.H" #include "createClouds.H" diff --git a/applications/solvers/lagrangian/sprayFoam/createFields.H b/applications/solvers/lagrangian/sprayFoam/createFields.H index e2124b3685..df9df8fbf3 100644 --- a/applications/solvers/lagrangian/sprayFoam/createFields.H +++ b/applications/solvers/lagrangian/sprayFoam/createFields.H @@ -94,21 +94,6 @@ autoPtr turbulence // Set the turbulence into the combustion model combustion->setTurbulence(turbulence()); -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); multivariateSurfaceInterpolationScheme::fieldTable fields; forAll(Y, i) @@ -131,6 +116,10 @@ volScalarField Qdot dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); +#include "createDpdt.H" + +#include "createK.H" + #include "createMRF.H" #include "createClouds.H" #include "createRadiationModel.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H index 0616b80ea8..c1f3538169 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -98,7 +98,6 @@ autoPtr turbulence compressible::turbulenceModel::New(rho, U, rhoPhi, mixture) ); -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" #include "createMRF.H" diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H index dcb89c35b9..39930ed638 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/createFields.H @@ -65,5 +65,4 @@ autoPtr turbulence ) ); -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); +#include "createK.H" diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/createFields.H b/applications/solvers/multiphase/interCondensingEvaporatingFoam/createFields.H index 4d43cf3d5d..87a9b2bbc0 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/createFields.H +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/createFields.H @@ -124,9 +124,6 @@ volScalarField kappaEff thermo->kappa() ); -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - Info<< "Creating field pDivU\n" << endl; volScalarField pDivU ( diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/pEqn.H b/applications/solvers/multiphase/interCondensingEvaporatingFoam/pEqn.H index 366dc78a12..5c7eec6d3c 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/pEqn.H +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/pEqn.H @@ -47,7 +47,6 @@ U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); fvOptions.correct(U); - K = 0.5*magSqr(U); } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamVtkLagrangianWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamVtkLagrangianWriter.C index 959485fb19..b3c254c6f0 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamVtkLagrangianWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamVtkLagrangianWriter.C @@ -100,7 +100,7 @@ void Foam::vtk::lagrangianWriter::writeVertsLegacy() for (label i=0; i < nParcels_; ++i) { - format().write(1); // Number of vertices for this cell (==1) + format().write(label(1)); // Number of vertices for this cell (==1) format().write(i); } format().flush(); diff --git a/bin/foamCreateBashCompletions b/bin/tools/foamCreateBashCompletions similarity index 50% rename from bin/foamCreateBashCompletions rename to bin/tools/foamCreateBashCompletions index 1c6a76cdcc..ccc65a2313 100755 --- a/bin/foamCreateBashCompletions +++ b/bin/tools/foamCreateBashCompletions @@ -29,40 +29,56 @@ # Create bash completions for OpenFOAM applications # #------------------------------------------------------------------------------ -#set -x - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< +Usage: ${0##*/} [OPTION] +options: + -d dir | -dir dir Directory to process + -u | -user Add \$FOAM_USER_APPBIN to the search directories + -h | -help Print the usage -* Create bash completions for OpenFOAM applications and write to . - By default searches directories \$FOAM_APPBIN and \$FOAM_USER_APPBIN - - -Options: - -d | -directory Directory to process - -h | -help Print the usage +Create bash completions for OpenFOAM applications and write to . +By default searches \$FOAM_APPBIN only. USAGE exit 1 } +# Report error and exit +die() +{ + exec 1>&2 + echo + echo "Error encountered:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "See '${0##*/} -help' for usage" + echo + exit 1 +} + +#------------------------------------------------------------------------------- +#set -x + unset outFile -searchDirs="$FOAM_APPBIN $FOAM_USER_APPBIN" +searchDirs="$FOAM_APPBIN" while [ "$#" -gt 0 ] do case "$1" in -h | -help) usage ;; - -d | -directory) + -d | -dir) searchDirs="$2" [ -d $searchDirs ] || usage "directory not found '$searchDirs'" shift ;; + -u | -user) + searchDirs="$searchDirs $FOAM_USER_APPBIN" + ;; -*) usage "unknown option: '$1'" ;; @@ -74,14 +90,14 @@ do shift done -[ -n "$outFile" ] || usage -\rm -f $outFile -touch $outFile +[ -n "$outFile" ] || usage "No output file specified" -writeFilterFunction() -{ - cat<< WRITEFILTER >> $1 +# Generate header +cat << HEADER > $outFile +#----------------------------------*-sh-*-------------------------------------- +# Bash completions for OpenFOAM applications + unset -f _of_filter_opts 2>/dev/null _of_filter_opts() { @@ -92,72 +108,74 @@ _of_filter_opts() done } -WRITEFILTER -} +HEADER +#------------------------------------------------------------------------------ +# +# Produce contents for switch for common options +# commonOptions() { - local options=$@ - local indent1=" " - local indent2=" " - for o in ${options[@]}; do - case $o in - -case) - echo "${indent1}-case)" - echo "${indent2}COMPREPLY=(\$(compgen -d -- \${cur}))" - echo "${indent2};;" - ;; - -srcDoc|-help) - echo "${indent1}-srcDoc|-help)" - echo "${indent2}COMPREPLY=()" - echo "${indent2};;" - ;; - -time) - echo "${indent1}-time)" - echo "${indent2}COMPREPLY=(\$(compgen -d -X '![-0-9]*' -- \${cur}))" - echo "${indent2};;" - ;; - -region) - echo "${indent1}-region)" - echo "${indent2}local regions=\$(sed 's#/##g' <<< \$([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null))))" - echo "${indent2}COMPREPLY=(\$(compgen -W \"\$regions\" -- \${cur}))" - echo "${indent2};;" - ;; - *Dict) - echo "${indent1}*Dict)" -# echo "${indent2}local dirs=\$(\ls -d s*/)" -# echo "${indent2}local files=\$(\ls -f | grep Dict)" -# echo "${indent2}COMPREPLY=(\$(compgen -W \"\$dirs \$files\" -- \${cur}))" - echo "${indent2}COMPREPLY=(\$(compgen -f -- \${cur}))" - echo "${indent2};;" - ;; + local indent1=" " + local indent2=" " + for opt + do + case $opt in + -case) + echo "${indent1}-case)" + echo "${indent2}COMPREPLY=(\$(compgen -d -- \${cur}))" + echo "${indent2};;" + ;; + -srcDoc|-help) + echo "${indent1}-srcDoc|-help)" + echo "${indent2}COMPREPLY=()" + echo "${indent2};;" + ;; + -time) + echo "${indent1}-time)" + echo "${indent2}COMPREPLY=(\$(compgen -d -X '![-0-9]*' -- \${cur}))" + echo "${indent2};;" + ;; + -region) + echo "${indent1}-region)" + echo "${indent2}local regions=\$(sed 's#/##g' <<< \$([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null))))" + echo "${indent2}COMPREPLY=(\$(compgen -W \"\$regions\" -- \${cur}))" + echo "${indent2};;" + ;; + *Dict) + echo "${indent1}*Dict)" +# echo "${indent2}local dirs=\$(\ls -d s*/)" +# echo "${indent2}local files=\$(\ls -f | grep Dict)" +# echo "${indent2}COMPREPLY=(\$(compgen -W \"\$dirs \$files\" -- \${cur}))" + echo "${indent2}COMPREPLY=(\$(compgen -f -- \${cur}))" + echo "${indent2};;" + ;; esac done } -# Generate header -cat << HEADER > $outFile -#----------------------------------*-sh-*-------------------------------------- -# Bash completions for OpenFOAM applications - -HEADER - -writeFilterFunction $outFile +#------------------------------------------------------------------------------ for dir in ${searchDirs} do - echo "Processing directory $dir" 1>&2 + if [ -d "$dir" ] + then + echo "Processing directory $dir" 1>&2 + else + echo "No such directory: $dir" 1>&2 + continue + fi # Sort with ignore-case - apps=($(\ls $dir | sort -f)) - for appName in "${apps[@]}" + set -- $(\ls $dir | sort -f) + for appName do [ -f "$dir/$appName" -a -x "$dir/$appName" ] || continue appHelp=$($appName -help) - echo "Processing $appName" 1>&2 + echo " $appName" 1>&2 # Options with args optsWithArgs=($(awk '/^ {0,4}-[a-z]/ && /> $outFile + cat << WRITECOMPLETION >> $outFile unset -f _of_${appName} 2>/dev/null _of_${appName}() { @@ -177,19 +195,19 @@ _of_${appName}() case \${prev} in $(commonOptions ${optsWithArgs[@]}) - *) - if [ "\${optsWithArgs/\${prev} /}" != "\${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=(\$(compgen -f -- \${cur})) - else - # Catch-all - present all remaining options - opts=\$(_of_filter_opts "\${opts}" "\${COMP_LINE}") - optsWithArgs=\$(_of_filter_opts "\${optsWithArgs}" "\${COMP_LINE}") - COMPREPLY=(\$(compgen -W "\${opts} \${optsWithArgs}" -- \${cur})) - fi - ;; + *) + if [ "\${optsWithArgs/\${prev} /}" != "\${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=(\$(compgen -f -- \${cur})) + else + # Catch-all - present all remaining options + opts=\$(_of_filter_opts "\${opts}" "\${COMP_LINE}") + optsWithArgs=\$(_of_filter_opts "\${optsWithArgs}" "\${COMP_LINE}") + COMPREPLY=(\$(compgen -W "\${opts} \${optsWithArgs}" -- \${cur})) + fi + ;; esac return 0 diff --git a/etc/bashrc b/etc/bashrc index 43e931f6db..2060a58690 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -169,12 +169,16 @@ export PATH LD_LIBRARY_PATH MANPATH # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamEtc config.sh/settings -_foamEtc config.sh/aliases -# Bash completions -if command -v complete > /dev/null 2>&1 +if /usr/bin/tty -s 2>/dev/null # Interactive shell then - _foamEtc config.sh/bashcompletion + _foamEtc config.sh/aliases + + # Bash completions + if command -v complete > /dev/null 2>&1 + then + _foamEtc config.sh/bashcompletion + fi fi diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi index e6b57838b4..eaf11328da 100644 --- a/etc/config.csh/mpi +++ b/etc/config.csh/mpi @@ -49,7 +49,7 @@ case SYSTEMOPENMPI: breaksw case OPENMPI: - setenv FOAM_MPI openmpi-2.0.2 + setenv FOAM_MPI openmpi-2.1.1 _foamEtc config.csh/openmpi # <- Adjustments (optional) setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI diff --git a/etc/config.csh/vtk b/etc/config.csh/vtk index 27421c4090..1abca1e975 100644 --- a/etc/config.csh/vtk +++ b/etc/config.csh/vtk @@ -36,15 +36,15 @@ # equivalent config.sh version too, since that is the one which will # be used during the build process. # -# It is recommended to use the VTK sources from ParaView 5.0.1. +# It is recommended to use VTK sources from ParaView (5.0.1 or later) # -# See the BuildIssues.txt about problems that can be encountered when using +# See BuildIssues.txt about problems that can be encountered when using # the 'plain' VTK sources. #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -set vtk_version=VTK-7.1.0 -set mesa_version=mesa-13.0.1 +set vtk_version=VTK-8.1.0 +set mesa_version=mesa-17.1.1 setenv VTK_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version setenv MESA_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version diff --git a/etc/config.sh/bashcompletion b/etc/config.sh/bashcompletion index 464fb2f1ef..82714979d2 100644 --- a/etc/config.sh/bashcompletion +++ b/etc/config.sh/bashcompletion @@ -21,22 +21,22 @@ _of_adiabaticFlameT() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -53,25 +53,25 @@ _of_adjointShapeOptimizationFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -88,22 +88,22 @@ _of_ansysToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -120,29 +120,29 @@ _of_applyBoundaryLayer() local optsWithArgs="-case -decomposeParDict -region -roots -ybl " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -159,22 +159,22 @@ _of_attachMesh() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -191,22 +191,22 @@ _of_autoPatch() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -223,26 +223,26 @@ _of_blockMesh() local optsWithArgs="-case -dict -region " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -259,22 +259,22 @@ _of_boundaryFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -291,22 +291,22 @@ _of_boxTurb() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -323,25 +323,25 @@ _of_buoyantBoussinesqPimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -358,25 +358,25 @@ _of_buoyantBoussinesqSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -393,25 +393,25 @@ _of_buoyantPimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -428,25 +428,25 @@ _of_buoyantSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -463,25 +463,25 @@ _of_cavitatingDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -498,25 +498,25 @@ _of_cavitatingFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -533,22 +533,22 @@ _of_cfx4ToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -565,35 +565,35 @@ _of_changeDictionary() local optsWithArgs="-case -decomposeParDict -dict -instance -region -roots -subDict -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *Dict) - COMPREPLY=($(compgen -f -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -610,32 +610,32 @@ _of_checkMesh() local optsWithArgs="-case -decomposeParDict -region -roots -time -writeFields -writeSets " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -652,22 +652,22 @@ _of_chemFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -684,22 +684,22 @@ _of_chemkinToFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -716,25 +716,25 @@ _of_chtMultiRegionFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -751,25 +751,25 @@ _of_chtMultiRegionSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -786,25 +786,25 @@ _of_coalChemistryFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -821,25 +821,25 @@ _of_coldEngineFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -856,28 +856,28 @@ _of_collapseEdges() local optsWithArgs="-case -collapseFaceSet -decomposeParDict -dict -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -894,25 +894,25 @@ _of_combinePatchFaces() local optsWithArgs="-case -concaveAngle -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -929,25 +929,25 @@ _of_compressibleInterDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -964,25 +964,25 @@ _of_compressibleInterFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -999,25 +999,25 @@ _of_compressibleMultiphaseInterFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1034,29 +1034,29 @@ _of_createBaffles() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1073,29 +1073,29 @@ _of_createExternalCoupledPatchGeometry() local optsWithArgs="-case -commsDir -decomposeParDict -region -regions -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1112,29 +1112,29 @@ _of_createPatch() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1151,25 +1151,25 @@ _of_createZeroDirectory() local optsWithArgs="-case -decomposeParDict -roots -templateDir " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1186,22 +1186,22 @@ _of_datToFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1218,32 +1218,32 @@ _of_decomposePar() local optsWithArgs="-case -decomposeParDict -region -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1260,25 +1260,25 @@ _of_deformedGeom() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1295,25 +1295,25 @@ _of_dnsFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1330,25 +1330,25 @@ _of_DPMDyMFoam() local optsWithArgs="-case -cloudName -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1365,25 +1365,25 @@ _of_DPMFoam() local optsWithArgs="-case -cloud -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1400,25 +1400,25 @@ _of_driftFluxFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1435,25 +1435,25 @@ _of_dsmcFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1470,25 +1470,25 @@ _of_dsmcInitialise() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1505,25 +1505,25 @@ _of_electrostaticFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1540,25 +1540,25 @@ _of_engineCompRatio() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1575,25 +1575,25 @@ _of_engineFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1610,25 +1610,25 @@ _of_engineSwirl() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1645,22 +1645,22 @@ _of_equilibriumCO() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1677,22 +1677,22 @@ _of_equilibriumFlameT() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1709,25 +1709,25 @@ _of_extrude2DMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1744,29 +1744,29 @@ _of_extrudeMesh() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1783,29 +1783,29 @@ _of_extrudeToRegionMesh() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1822,29 +1822,29 @@ _of_faceAgglomerate() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1861,25 +1861,25 @@ _of_financialFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1896,25 +1896,25 @@ _of_fireFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1931,22 +1931,22 @@ _of_fireToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1963,25 +1963,25 @@ _of_flattenMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -1998,22 +1998,22 @@ _of_fluent3DMeshToFoam() local optsWithArgs="-case -ignoreCellGroups -ignoreFaceGroups -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2030,22 +2030,22 @@ _of_fluentMeshToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2062,25 +2062,25 @@ _of_foamDataToFluent() local optsWithArgs="-case -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2097,25 +2097,25 @@ _of_foamDictionary() local optsWithArgs="-add -case -decomposeParDict -diff -entry -roots -set " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2132,32 +2132,32 @@ _of_foamFormatConvert() local optsWithArgs="-case -decomposeParDict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2174,29 +2174,29 @@ _of_foamHelp() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2213,22 +2213,22 @@ _of_foamList() local optsWithArgs="-case -scalarBCs -vectorBCs " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2245,25 +2245,25 @@ _of_foamListTimes() local optsWithArgs="-case -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2280,22 +2280,22 @@ _of_foamMeshToFluent() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2312,32 +2312,32 @@ _of_foamToEnsight() local optsWithArgs="-case -cellZone -decomposeParDict -faceZones -fields -name -patches -region -roots -time -width " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2354,25 +2354,25 @@ _of_foamToEnsightParts() local optsWithArgs="-case -index -name -time -width " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2389,25 +2389,25 @@ _of_foamToFireMesh() local optsWithArgs="-case -scale -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2424,25 +2424,25 @@ _of_foamToGMV() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2459,25 +2459,25 @@ _of_foamToStarMesh() local optsWithArgs="-case -scale -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2494,25 +2494,25 @@ _of_foamToSurface() local optsWithArgs="-case -scale -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2529,28 +2529,28 @@ _of_foamToTetDualMesh() local optsWithArgs="-case -decomposeParDict -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2567,32 +2567,32 @@ _of_foamToVTK() local optsWithArgs="-case -cellSet -decomposeParDict -excludePatches -faceSet -fields -name -pointSet -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2609,32 +2609,32 @@ _of_foamUpgradeCyclics() local optsWithArgs="-case -decomposeParDict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2651,25 +2651,25 @@ _of_foamyHexMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2686,22 +2686,22 @@ _of_foamyQuadMesh() local optsWithArgs="-case -pointsFile " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2718,22 +2718,22 @@ _of_gambitToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2750,26 +2750,26 @@ _of_gmshToFoam() local optsWithArgs="-case -region " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2786,25 +2786,25 @@ _of_icoFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2821,25 +2821,25 @@ _of_icoUncoupledKinematicParcelDyMFoam() local optsWithArgs="-case -cloud -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2856,25 +2856,25 @@ _of_icoUncoupledKinematicParcelFoam() local optsWithArgs="-case -cloud -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2891,22 +2891,22 @@ _of_ideasUnvToFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2923,25 +2923,25 @@ _of_insideCells() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2958,25 +2958,25 @@ _of_interCondensatingEvaporatingFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -2993,25 +2993,25 @@ _of_interDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3028,25 +3028,25 @@ _of_interFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3063,25 +3063,25 @@ _of_interMixingFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3098,25 +3098,25 @@ _of_interPhaseChangeDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3133,25 +3133,25 @@ _of_interPhaseChangeFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3168,22 +3168,22 @@ _of_kivaToFoam() local optsWithArgs="-case -file -version -zHeadMin " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3200,25 +3200,25 @@ _of_laplacianFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3235,25 +3235,25 @@ _of_magneticFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3270,28 +3270,28 @@ _of_mapFields() local optsWithArgs="-case -mapMethod -sourceDecomposeParDict -sourceRegion -sourceTime -targetDecomposeParDict -targetRegion " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *Dict) - COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3308,25 +3308,25 @@ _of_mapFieldsPar() local optsWithArgs="-case -decomposeParDict -fields -mapMethod -patchMapMethod -roots -sourceRegion -sourceTime -targetRegion " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3343,25 +3343,25 @@ _of_mdEquilibrationFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3378,25 +3378,25 @@ _of_mdFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3413,25 +3413,25 @@ _of_mdInitialise() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3448,25 +3448,25 @@ _of_mergeMeshes() local optsWithArgs="-addRegion -case -decomposeParDict -masterRegion -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3483,29 +3483,29 @@ _of_mergeOrSplitBaffles() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3522,25 +3522,25 @@ _of_mhdFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3557,25 +3557,25 @@ _of_mirrorMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3592,22 +3592,22 @@ _of_mixtureAdiabaticFlameT() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3624,25 +3624,25 @@ _of_modifyMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3659,29 +3659,29 @@ _of_moveDynamicMesh() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3698,25 +3698,25 @@ _of_moveEngineMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3733,25 +3733,25 @@ _of_moveMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3768,25 +3768,25 @@ _of_MPPICDyMFoam() local optsWithArgs="-case -cloudName -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3803,25 +3803,25 @@ _of_MPPICFoam() local optsWithArgs="-case -cloud -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3838,25 +3838,25 @@ _of_MPPICInterFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3873,22 +3873,22 @@ _of_mshToFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3905,25 +3905,25 @@ _of_multiphaseEulerFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3940,25 +3940,25 @@ _of_multiphaseInterDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -3975,25 +3975,25 @@ _of_multiphaseInterFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4010,25 +4010,25 @@ _of_netgenNeutralToFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4045,25 +4045,25 @@ _of_noise() local optsWithArgs="-case -decomposeParDict -dict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4080,25 +4080,25 @@ _of_nonNewtonianIcoFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4115,22 +4115,22 @@ _of_objToVTK() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4147,35 +4147,210 @@ _of_orientFaceZone() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 } complete -o nospace -F _of_orientFaceZone orientFaceZone +unset -f _of_overInterDyMFoam 2>/dev/null +_of_overInterDyMFoam() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local opts="-noFunctionObjects -parallel -postProcess -srcDoc -doc -help " + local optsWithArgs="-case -decomposeParDict -roots " + + case ${prev} in + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; + esac + + return 0 +} +complete -o nospace -F _of_overInterDyMFoam overInterDyMFoam + +unset -f _of_overLaplacianDyMFoam 2>/dev/null +_of_overLaplacianDyMFoam() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local opts="-noFunctionObjects -parallel -srcDoc -doc -help " + local optsWithArgs="-case -decomposeParDict -roots " + + case ${prev} in + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; + esac + + return 0 +} +complete -o nospace -F _of_overLaplacianDyMFoam overLaplacianDyMFoam + +unset -f _of_overPimpleDyMFoam 2>/dev/null +_of_overPimpleDyMFoam() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local opts="-noFunctionObjects -parallel -srcDoc -doc -help " + local optsWithArgs="-case -decomposeParDict -roots " + + case ${prev} in + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; + esac + + return 0 +} +complete -o nospace -F _of_overPimpleDyMFoam overPimpleDyMFoam + +unset -f _of_overRhoPimpleDyMFoam 2>/dev/null +_of_overRhoPimpleDyMFoam() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local opts="-noFunctionObjects -parallel -srcDoc -doc -help " + local optsWithArgs="-case -decomposeParDict -roots " + + case ${prev} in + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; + esac + + return 0 +} +complete -o nospace -F _of_overRhoPimpleDyMFoam overRhoPimpleDyMFoam + +unset -f _of_overSimpleFoam 2>/dev/null +_of_overSimpleFoam() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local opts="-noFunctionObjects -parallel -postProcess -srcDoc -doc -help " + local optsWithArgs="-case -decomposeParDict -roots " + + case ${prev} in + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; + esac + + return 0 +} +complete -o nospace -F _of_overSimpleFoam overSimpleFoam + unset -f _of_particleTracks 2>/dev/null _of_particleTracks() { @@ -4186,32 +4361,32 @@ _of_particleTracks() local optsWithArgs="-case -decomposeParDict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4228,32 +4403,32 @@ _of_patchSummary() local optsWithArgs="-case -decomposeParDict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4270,25 +4445,25 @@ _of_pdfPlot() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4305,25 +4480,25 @@ _of_PDRFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4340,25 +4515,25 @@ _of_PDRMesh() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4375,25 +4550,25 @@ _of_pimpleDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4410,25 +4585,25 @@ _of_pimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4445,25 +4620,25 @@ _of_pisoFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4480,22 +4655,22 @@ _of_plot3dToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4512,22 +4687,22 @@ _of_polyDualMesh() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4544,25 +4719,25 @@ _of_porousSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4579,25 +4754,25 @@ _of_postChannel() local optsWithArgs="-case -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4614,32 +4789,32 @@ _of_postProcess() local optsWithArgs="-case -decomposeParDict -dict -field -fields -func -funcs -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4656,25 +4831,25 @@ _of_potentialFoam() local optsWithArgs="-case -decomposeParDict -pName -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4691,25 +4866,25 @@ _of_potentialFreeSurfaceDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4726,25 +4901,25 @@ _of_potentialFreeSurfaceFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4761,25 +4936,25 @@ _of_reactingFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4796,25 +4971,25 @@ _of_reactingMultiphaseEulerFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4831,25 +5006,25 @@ _of_reactingParcelFilmFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4866,25 +5041,25 @@ _of_reactingParcelFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4901,25 +5076,25 @@ _of_reactingTwoPhaseEulerFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4936,29 +5111,29 @@ _of_reconstructPar() local optsWithArgs="-case -fields -lagrangianFields -region -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -4975,29 +5150,29 @@ _of_reconstructParMesh() local optsWithArgs="-case -mergeTol -region -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5014,32 +5189,32 @@ _of_redistributePar() local optsWithArgs="-case -decomposeParDict -mergeTol -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5056,29 +5231,29 @@ _of_refineHexMesh() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5095,25 +5270,25 @@ _of_refinementLevel() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5130,29 +5305,29 @@ _of_refineMesh() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5169,25 +5344,25 @@ _of_refineWallLayer() local optsWithArgs="-case -decomposeParDict -roots -useSet " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5204,25 +5379,25 @@ _of_removeFaces() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5239,32 +5414,32 @@ _of_renumberMesh() local optsWithArgs="-case -decomposeParDict -dict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5281,25 +5456,25 @@ _of_rhoCentralDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5316,25 +5491,25 @@ _of_rhoCentralFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5351,25 +5526,25 @@ _of_rhoPimpleDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5386,25 +5561,25 @@ _of_rhoPimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5421,25 +5596,25 @@ _of_rhoPorousSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5456,25 +5631,25 @@ _of_rhoReactingBuoyantFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5491,25 +5666,25 @@ _of_rhoReactingFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5526,25 +5701,25 @@ _of_rhoSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5561,28 +5736,28 @@ _of_rotateMesh() local optsWithArgs="-case -decomposeParDict -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5599,25 +5774,25 @@ _of_scalarTransportFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5634,22 +5809,22 @@ _of_selectCells() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5666,29 +5841,29 @@ _of_setFields() local optsWithArgs="-case -decomposeParDict -dict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5705,32 +5880,32 @@ _of_setSet() local optsWithArgs="-batch -case -decomposeParDict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5747,32 +5922,32 @@ _of_setsToZones() local optsWithArgs="-case -decomposeParDict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5789,25 +5964,25 @@ _of_shallowWaterFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5824,25 +5999,25 @@ _of_simpleCoalParcelFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5859,25 +6034,25 @@ _of_simpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5894,25 +6069,25 @@ _of_simpleReactingParcelFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5929,28 +6104,28 @@ _of_singleCellMesh() local optsWithArgs="-case -decomposeParDict -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5967,22 +6142,22 @@ _of_smapToFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -5999,29 +6174,29 @@ _of_snappyHexMesh() local optsWithArgs="-case -decomposeParDict -dict -outFile -patches -region -roots -surfaceSimplify " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6038,22 +6213,22 @@ _of_snappyRefineMesh() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6070,25 +6245,25 @@ _of_solidDisplacementFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6105,25 +6280,25 @@ _of_solidEquilibriumDisplacementFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6140,25 +6315,25 @@ _of_sonicDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6175,25 +6350,25 @@ _of_sonicFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6210,25 +6385,25 @@ _of_sonicLiquidFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6245,22 +6420,22 @@ _of_splitCells() local optsWithArgs="-case -set -tol " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6277,22 +6452,22 @@ _of_splitMesh() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6309,29 +6484,29 @@ _of_splitMeshRegions() local optsWithArgs="-blockedFaces -case -cellZonesFileOnly -decomposeParDict -insidePoint -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6348,25 +6523,25 @@ _of_sprayDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6383,25 +6558,25 @@ _of_sprayEngineFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6418,25 +6593,25 @@ _of_sprayFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6453,25 +6628,25 @@ _of_SRFPimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6488,25 +6663,25 @@ _of_SRFSimpleFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6523,22 +6698,22 @@ _of_star4ToFoam() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6555,29 +6730,29 @@ _of_steadyParticleTracks() local optsWithArgs="-case -dict -region -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6594,29 +6769,29 @@ _of_stitchMesh() local optsWithArgs="-case -region -toleranceDict " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6633,29 +6808,29 @@ _of_subsetMesh() local optsWithArgs="-case -decomposeParDict -patch -patches -region -resultTime -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6672,22 +6847,22 @@ _of_surfaceAdd() local optsWithArgs="-case -points " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6704,22 +6879,22 @@ _of_surfaceBooleanFeatures() local optsWithArgs="-case -trim " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6736,22 +6911,22 @@ _of_surfaceCheck() local optsWithArgs="-case -outputThreshold " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6768,22 +6943,22 @@ _of_surfaceClean() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6800,22 +6975,22 @@ _of_surfaceCoarsen() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6832,22 +7007,22 @@ _of_surfaceConvert() local optsWithArgs="-case -scale -writePrecision " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6864,22 +7039,22 @@ _of_surfaceFeatureConvert() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6896,22 +7071,22 @@ _of_surfaceFeatureExtract() local optsWithArgs="-case -dict " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6928,22 +7103,22 @@ _of_surfaceFind() local optsWithArgs="-case -x -y -z " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6960,22 +7135,22 @@ _of_surfaceHookUp() local optsWithArgs="-case -dict " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -6992,22 +7167,22 @@ _of_surfaceInertia() local optsWithArgs="-case -density -referencePoint " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7024,22 +7199,22 @@ _of_surfaceInflate() local optsWithArgs="-case -featureAngle -nSmooth " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7057,19 +7232,19 @@ _of_surfaceLambdaMuSmooth() case ${prev} in - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7086,22 +7261,22 @@ _of_surfaceMeshConvert() local optsWithArgs="-case -dict -from -scaleIn -scaleOut -to " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7118,22 +7293,22 @@ _of_surfaceMeshConvertTesting() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7150,22 +7325,22 @@ _of_surfaceMeshExport() local optsWithArgs="-case -dict -from -name -scaleIn -scaleOut -to " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7182,22 +7357,22 @@ _of_surfaceMeshImport() local optsWithArgs="-case -dict -from -name -scaleIn -scaleOut -to " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7214,22 +7389,22 @@ _of_surfaceMeshInfo() local optsWithArgs="-case -scale " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7246,32 +7421,32 @@ _of_surfaceMeshTriangulate() local optsWithArgs="-case -decomposeParDict -faceZones -patches -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7288,22 +7463,22 @@ _of_surfaceOrient() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7320,22 +7495,22 @@ _of_surfacePatch() local optsWithArgs="-case -dict " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7352,22 +7527,22 @@ _of_surfacePointMerge() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7384,25 +7559,25 @@ _of_surfaceRedistributePar() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7419,22 +7594,22 @@ _of_surfaceRefineRedGreen() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7451,22 +7626,22 @@ _of_surfaceSplitByPatch() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7484,19 +7659,19 @@ _of_surfaceSplitByTopology() case ${prev} in - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7513,22 +7688,22 @@ _of_surfaceSplitNonManifolds() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7545,22 +7720,22 @@ _of_surfaceSubset() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7577,22 +7752,22 @@ _of_surfaceToPatch() local optsWithArgs="-case -faceSet -tol " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7609,22 +7784,22 @@ _of_surfaceTransformPoints() local optsWithArgs="-case -rollPitchYaw -rotate -scale -translate -yawPitchRoll " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7641,32 +7816,32 @@ _of_temporalInterpolate() local optsWithArgs="-case -decomposeParDict -divisions -fields -interpolationType -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7683,25 +7858,25 @@ _of_tetgenToFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7718,25 +7893,25 @@ _of_thermoFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7753,32 +7928,32 @@ _of_topoSet() local optsWithArgs="-case -decomposeParDict -dict -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7795,29 +7970,29 @@ _of_transformPoints() local optsWithArgs="-case -decomposeParDict -region -rollPitchYaw -roots -rotate -scale -translate -yawPitchRoll " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7834,25 +8009,25 @@ _of_twoLiquidMixingFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7869,25 +8044,25 @@ _of_twoPhaseEulerFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7904,25 +8079,25 @@ _of_uncoupledKinematicParcelFoam() local optsWithArgs="-case -cloud -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7939,29 +8114,29 @@ _of_viewFactorsGen() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -7978,22 +8153,22 @@ _of_vtkUnstructuredToFoam() local optsWithArgs="-case " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... + COMPREPLY=($(compgen -f -- ${cur})) + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -8010,25 +8185,25 @@ _of_wallFunctionTable() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -8045,32 +8220,32 @@ _of_writeMeshObj() local optsWithArgs="-case -cell -cellSet -decomposeParDict -face -faceSet -point -region -roots -time " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + -time) + COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - -time) - COMPREPLY=($(compgen -d -X '![-0-9]*' -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -8087,25 +8262,25 @@ _of_XiDyMFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -8122,25 +8297,25 @@ _of_XiFoam() local optsWithArgs="-case -decomposeParDict -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 @@ -8157,29 +8332,29 @@ _of_zipUpMesh() local optsWithArgs="-case -decomposeParDict -region -roots " case ${prev} in - -case) - COMPREPLY=($(compgen -d -- ${cur})) - ;; - *Dict) + -case) + COMPREPLY=($(compgen -d -- ${cur})) + ;; + *Dict) + COMPREPLY=($(compgen -f -- ${cur})) + ;; + -region) + local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) + COMPREPLY=($(compgen -W "$regions" -- ${cur})) + ;; + *) + if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ] + then + # Unknown type of arg follows - set to files. + # Not always correct but can still navigate path if needed... COMPREPLY=($(compgen -f -- ${cur})) - ;; - -region) - local regions=$(sed 's#/##g' <<< $([ -d system ] && (\cd system && (\ls -d */ 2>/dev/null)))) - COMPREPLY=($(compgen -W "$regions" -- ${cur})) - ;; - *) - if [ "${optsWithArgs/${prev} /}" != "${optsWithArgs}" ]; then - # Unknown what type of arg follows - set to files - # not always correct but at least can still navigate path if - # needed... - COMPREPLY=($(compgen -f -- ${cur})) - else - # Catch-all - present all remaining options - opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") - optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") - COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) - fi - ;; + else + # Catch-all - present all remaining options + opts=$(_of_filter_opts "${opts}" "${COMP_LINE}") + optsWithArgs=$(_of_filter_opts "${optsWithArgs}" "${COMP_LINE}") + COMPREPLY=($(compgen -W "${opts} ${optsWithArgs}" -- ${cur})) + fi + ;; esac return 0 diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index 812b354a1b..d28b3a37bb 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -55,7 +55,7 @@ SYSTEMOPENMPI) ;; OPENMPI) - export FOAM_MPI=openmpi-2.0.2 + export FOAM_MPI=openmpi-2.1.1 _foamEtc config.sh/openmpi # <- Adjustments (optional) export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI diff --git a/etc/config.sh/vtk b/etc/config.sh/vtk index 9c2a0fe33e..8d881b64c5 100644 --- a/etc/config.sh/vtk +++ b/etc/config.sh/vtk @@ -36,15 +36,15 @@ # - the vtk_version, mesa_version variables are retained. # (for future integration into ThirdParty build) # -# It is recommended to use the VTK sources from ParaView 5.0.1 or later +# It is recommended to use VTK sources from ParaView (5.0.1 or later) # -# See the BuildIssues.txt about problems that can be encountered when using +# See BuildIssues.txt about problems that can be encountered when using # the 'plain' VTK sources. #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -vtk_version=VTK-7.1.0 -mesa_version=mesa-13.0.1 +vtk_version=VTK-8.1.0 +mesa_version=mesa-17.1.1 export VTK_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version export MESA_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version diff --git a/etc/cshrc b/etc/cshrc index 688905c2cf..3208ca0ac8 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -216,7 +216,11 @@ if ( $status == 0 ) setenv MANPATH $cleaned # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamEtc config.csh/settings -_foamEtc config.csh/aliases + +if ($?prompt) then # Interactive shell + _foamEtc config.csh/aliases +endif + # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index c985a3135f..ee0677ecbb 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -770,10 +770,11 @@ void Foam::GeometricField::storeOldTimes() const ) { storeOldTime(); + timeIndex_ = this->time().timeIndex(); } // Correct time index - timeIndex_ = this->time().timeIndex(); + //timeIndex_ = this->time().timeIndex(); } @@ -835,6 +836,17 @@ Foam::GeometricField::oldTime() const ), *this ); + + if (debug) + { + InfoInFunction + << "created old time field " << field0Ptr_->info() << endl; + + if (debug&2) + { + error::printStack(Info); + } + } } else { diff --git a/src/finiteVolume/cfdTools/compressible/createDpdt.H b/src/finiteVolume/cfdTools/compressible/createDpdt.H new file mode 100644 index 0000000000..2d645e5e1d --- /dev/null +++ b/src/finiteVolume/cfdTools/compressible/createDpdt.H @@ -0,0 +1,18 @@ +Info<< "Creating field dpdt\n" << endl; +volScalarField dpdt +( + IOobject + ( + "dpdt", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + fvc::ddt(p) +); + +if (!thermo.dpdt()) +{ + dpdt == dimensionedScalar("0", dpdt.dimensions(), 0); +} diff --git a/src/finiteVolume/cfdTools/general/include/createK.H b/src/finiteVolume/cfdTools/general/include/createK.H new file mode 100644 index 0000000000..a51850a813 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/include/createK.H @@ -0,0 +1,16 @@ +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); + +if (U.nOldTimes()) +{ + volVectorField* Uold = &U.oldTime(); + volScalarField* Kold = &K.oldTime(); + *Kold == 0.5*magSqr(*Uold); + + while (Uold->nOldTimes()) + { + Uold = &Uold->oldTime(); + Kold = &Kold->oldTime(); + *Kold == 0.5*magSqr(*Uold); + } +} diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C index 641a645132..06676f037b 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,7 +58,7 @@ template template scalar backwardDdtScheme::deltaT0_(const GeoField& vf) const { - if (vf.nOldTimes() < 2) + if (mesh().time().timeIndex() < 2) { return GREAT; } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H index af321f143f..abedc954a9 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H @@ -92,27 +92,13 @@ public: backwardDdtScheme(const fvMesh& mesh) : ddtScheme(mesh) - { - // Ensure the old-old-time cell volumes are available - // for moving meshes - if (mesh.moving()) - { - mesh.V00(); - } - } + {} //- Construct from mesh and Istream backwardDdtScheme(const fvMesh& mesh, Istream& is) : ddtScheme(mesh, is) - { - // Ensure the old-old-time cell volumes are available - // for moving meshes - if (mesh.moving()) - { - mesh.V00(); - } - } + {} // Member Functions diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 2c667ac619..f63acb9b5d 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -198,8 +198,8 @@ void Foam::fvMesh::storeOldVol(const scalarField& V) time().timeName(), *this, IOobject::NO_READ, - IOobject::NO_WRITE, - false + IOobject::AUTO_WRITE, + true ), *this, dimVolume @@ -281,8 +281,8 @@ Foam::fvMesh::fvMesh(const IOobject& io) time().timeName(), *this, IOobject::MUST_READ, - IOobject::NO_WRITE, - false + IOobject::AUTO_WRITE, + true ), *this ); diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index c530ee0a9a..a987398bb7 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -260,11 +260,12 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V00() const *this, IOobject::NO_READ, IOobject::NO_WRITE, - false + true ), V0() ); + // If V00 is used then V0 should be stored for restart V0Ptr_->writeOpt() = IOobject::AUTO_WRITE; } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C index 6d6e81d444..179836560a 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -195,7 +195,17 @@ void Foam::EulerCoordinateRotation::calcTransform Foam::EulerCoordinateRotation::EulerCoordinateRotation() : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) +{} + + +Foam::EulerCoordinateRotation::EulerCoordinateRotation +( + const EulerCoordinateRotation& r +) +: + R_(r.R_), + Rtr_(r.Rtr_) {} @@ -206,7 +216,7 @@ Foam::EulerCoordinateRotation::EulerCoordinateRotation ) : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) { calcTransform ( @@ -227,7 +237,7 @@ Foam::EulerCoordinateRotation::EulerCoordinateRotation ) : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) { calcTransform(phiAngle, thetaAngle, psiAngle, inDegrees); } @@ -239,9 +249,9 @@ Foam::EulerCoordinateRotation::EulerCoordinateRotation ) : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) { - vector rotation(dict.lookup("rotation")); + const vector rotation(dict.lookup("rotation")); calcTransform ( @@ -259,36 +269,8 @@ Foam::EulerCoordinateRotation::EulerCoordinateRotation const objectRegistry& ) : - R_(sphericalTensor::I), - Rtr_(R_) -{ - vector rotation(dict.lookup("rotation")); - - calcTransform - ( - rotation.component(vector::X), - rotation.component(vector::Y), - rotation.component(vector::Z), - dict.lookupOrDefault("degrees", true) - ); -} - - -Foam::EulerCoordinateRotation::EulerCoordinateRotation -( - const EulerCoordinateRotation& r -) -: - R_(r.R_), - Rtr_(r.Rtr_) + EulerCoordinateRotation(dict) {} -void Foam::EulerCoordinateRotation::write(Ostream& os) const -{ - os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl; - os.writeKeyword("e2") << e2() << token::END_STATEMENT << nl; - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; -} - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H index 984df3912d..53ee185b68 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H +++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -91,7 +91,7 @@ class EulerCoordinateRotation const scalar phiAngle, const scalar thetaAngle, const scalar psiAngle, - const bool inDegrees=true + const bool inDegrees ); @@ -106,11 +106,14 @@ public: //- Construct null EulerCoordinateRotation(); + //- Construct as copy + EulerCoordinateRotation(const EulerCoordinateRotation& r); + //- Construct from rotation vector EulerCoordinateRotation ( const vector& phiThetaPsi, - const bool inDegrees=true + const bool inDegrees ); //- Construct from components of rotation vector @@ -119,17 +122,18 @@ public: const scalar phiAngle, const scalar thetaAngle, const scalar psiAngle, - const bool inDegrees=true + const bool inDegrees ); //- Construct from dictionary - EulerCoordinateRotation(const dictionary&); + explicit EulerCoordinateRotation(const dictionary& dict); - //- Construct from dictionary and mesh - EulerCoordinateRotation(const dictionary&, const objectRegistry&); - - //- Construct as copy - EulerCoordinateRotation(const EulerCoordinateRotation&); + //- Construct from dictionary and a registry (typically a mesh) + EulerCoordinateRotation + ( + const dictionary& dict, + const objectRegistry& unused + ); //- Return clone autoPtr clone() const @@ -226,11 +230,6 @@ public: // symmetrical tensor virtual symmTensor transformVector(const vector& st) const; - - // Write - - //- Write - virtual void write(Ostream&) const; }; diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C index 24538ba057..e6a50a25d6 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -147,6 +147,7 @@ Foam::symmTensor Foam::STARCDCoordinateRotation::transformVector return transformPrincipal(R_, st); } + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::STARCDCoordinateRotation::calcTransform @@ -195,7 +196,17 @@ void Foam::STARCDCoordinateRotation::calcTransform Foam::STARCDCoordinateRotation::STARCDCoordinateRotation() : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) +{} + + +Foam::STARCDCoordinateRotation::STARCDCoordinateRotation +( + const STARCDCoordinateRotation& r +) +: + R_(r.R_), + Rtr_(r.Rtr_) {} @@ -206,7 +217,7 @@ Foam::STARCDCoordinateRotation::STARCDCoordinateRotation ) : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) { calcTransform ( @@ -227,7 +238,7 @@ Foam::STARCDCoordinateRotation::STARCDCoordinateRotation ) : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) { calcTransform(rotZ, rotX, rotY, inDegrees); } @@ -239,9 +250,9 @@ Foam::STARCDCoordinateRotation::STARCDCoordinateRotation ) : R_(sphericalTensor::I), - Rtr_(R_) + Rtr_(sphericalTensor::I) { - vector rotation(dict.lookup("rotation")); + const vector rotation(dict.lookup("rotation")); calcTransform ( @@ -258,34 +269,9 @@ Foam::STARCDCoordinateRotation::STARCDCoordinateRotation const dictionary& dict, const objectRegistry& ) -{ - vector rotation(dict.lookup("rotation")); - - calcTransform - ( - rotation.component(vector::X), - rotation.component(vector::Y), - rotation.component(vector::Z), - dict.lookupOrDefault("degrees", true) - ); -} - - -Foam::STARCDCoordinateRotation::STARCDCoordinateRotation -( - const STARCDCoordinateRotation& r -) : - R_(r.R_), - Rtr_(r.Rtr_) + STARCDCoordinateRotation(dict) {} -void Foam::STARCDCoordinateRotation::write(Ostream& os) const -{ - os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl; - os.writeKeyword("e2") << e2() << token::END_STATEMENT << nl; - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; -} - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H index e255070058..b76da859d1 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H +++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,7 +83,7 @@ class STARCDCoordinateRotation const scalar rotZ, const scalar rotX, const scalar rotY, - const bool inDegrees=true + const bool inDegrees ); @@ -98,11 +98,14 @@ public: //- Construct null STARCDCoordinateRotation(); + //- Construct as copy + STARCDCoordinateRotation(const STARCDCoordinateRotation& r); + //- Construct from rotation vector STARCDCoordinateRotation ( const vector& rotZrotXrotY, - const bool inDegrees=true + const bool inDegrees ); //- Construct from components of rotation vector @@ -111,17 +114,19 @@ public: const scalar rotZ, const scalar rotX, const scalar rotY, - const bool inDegrees=true + const bool inDegrees ); //- Construct from dictionary - STARCDCoordinateRotation(const dictionary&); + explicit STARCDCoordinateRotation(const dictionary& dict); - //- Construct from dictionary and mesh - STARCDCoordinateRotation(const dictionary&, const objectRegistry&); + //- Construct from dictionary and a registry (typically a mesh) + STARCDCoordinateRotation + ( + const dictionary& dict, + const objectRegistry& unused + ); - //- Construct as copy - STARCDCoordinateRotation(const STARCDCoordinateRotation&); //- Return clone autoPtr clone() const @@ -218,11 +223,6 @@ public: // symmetrical tensor virtual symmTensor transformVector(const vector& st) const; - - // Write - - //- Write - virtual void write(Ostream&) const; }; diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C index 313a51df49..b22c509c4d 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,7 +32,12 @@ License namespace Foam { defineTypeNameAndDebug(axesRotation, 0); - addToRunTimeSelectionTable(coordinateRotation, axesRotation, dictionary); + addToRunTimeSelectionTable + ( + coordinateRotation, + axesRotation, + dictionary + ); addToRunTimeSelectionTable ( coordinateRotation, @@ -41,119 +46,13 @@ namespace Foam ); } -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::axesRotation::calcTransform -( - const vector& axis1, - const vector& axis2, - const axisOrder& order -) -{ - vector a = axis1/mag(axis1); - vector b = axis2; - - b = b - (b & a)*a; - - if (mag(b) < SMALL) - { - FatalErrorInFunction - << "axis1, axis2 appear co-linear: " - << axis1 << ", " << axis2 << endl - << abort(FatalError); - } - - b = b/mag(b); - vector c = a^b; - - tensor Rtr; - switch (order) - { - case e1e2: - { - Rtr = tensor(a, b, c); - break; - } - case e2e3: - { - Rtr = tensor(c, a, b); - break; - } - case e3e1: - { - Rtr = tensor(b, c, a); - break; - } - default: - { - FatalErrorInFunction - << "Unhandled axes specifictation" << endl - << abort(FatalError); - - Rtr = Zero; - break; - } - } - - // Global->local transformation - Rtr_ = Rtr; - - // Local->global transformation - R_ = Rtr.T(); -} - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::axesRotation::axesRotation() : R_(sphericalTensor::I), - Rtr_(R_) -{} - - -Foam::axesRotation::axesRotation -( - const vector& axis, - const vector& dir -) -: - R_(sphericalTensor::I), - Rtr_(R_) -{ - calcTransform(axis, dir, e3e1); -} - - -Foam::axesRotation::axesRotation -( - const dictionary& dict -) -: - R_(sphericalTensor::I), - Rtr_(R_) -{ - operator=(dict); -} - - -Foam::axesRotation::axesRotation -( - const dictionary& dict, - const objectRegistry& obr -) -: - R_(sphericalTensor::I), - Rtr_(R_) -{ - operator=(dict); -} - - -Foam::axesRotation::axesRotation(const tensor& R) -: - R_(R), - Rtr_(R_.T()) + Rtr_(sphericalTensor::I) {} @@ -164,9 +63,145 @@ Foam::axesRotation::axesRotation(const axesRotation& r) {} +Foam::axesRotation::axesRotation(const tensor& R) +: + R_(R), + Rtr_(R_.T()) +{} + + +Foam::axesRotation::axesRotation +( + const vector& axis, + const vector& dir, + const axisOrder& order +) +: + R_(sphericalTensor::I), + Rtr_(sphericalTensor::I) +{ + setTransform(axis, dir, order); +} + + +Foam::axesRotation::axesRotation +( + const vector& axis +) +: + R_(sphericalTensor::I), + Rtr_(sphericalTensor::I) +{ + direction maxCmpt = 0, dirCmpt = 1; + + scalar maxVal = mag(axis[maxCmpt]); + bool negative = (axis[maxCmpt] < 0); + + for (direction cmpt = 1; cmpt < vector::nComponents; ++cmpt) + { + const scalar val = mag(axis[cmpt]); + + if (maxVal < val) + { + maxVal = val; + maxCmpt = cmpt; + dirCmpt = maxCmpt+1; + negative = (axis[cmpt] < 0); + + if (dirCmpt >= vector::nComponents) + { + dirCmpt = 0; + } + } + } + + vector dir = Zero; + dir.component(dirCmpt) = (negative ? -1 : 1); + + setTransform(axis, dir, E3_E1); +} + + +Foam::axesRotation::axesRotation +( + const dictionary& dict +) +: + R_(sphericalTensor::I), + Rtr_(sphericalTensor::I) +{ + operator=(dict); +} + + +Foam::axesRotation::axesRotation +( + const dictionary& dict, + const objectRegistry& +) +: + axesRotation(dict) +{} + // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // +void Foam::axesRotation::setTransform +( + const vector& axis1, + const vector& axis2, + const axisOrder& order +) +{ + const vector a = axis1/mag(axis1); + vector b = axis2; + + b = b - (b & a)*a; + + if (mag(b) < SMALL) + { + FatalErrorInFunction + << "axis1, axis2 appear to be co-linear: " + << axis1 << ", " << axis2 << endl + << abort(FatalError); + } + + b = b/mag(b); + const vector c = a^b; + + // Global->local transformation + switch (order) + { + case E1_E2: + { + Rtr_ = tensor(a, b, c); + break; + } + case E2_E3: + { + Rtr_ = tensor(c, a, b); + break; + } + case E3_E1: + { + Rtr_ = tensor(b, c, a); + break; + } + default: + { + FatalErrorInFunction + << "Unhandled axes specification" << endl + << abort(FatalError); + + break; + } + } + + // Local->global transformation + R_ = Rtr_.T(); +} + + const Foam::tensorField& Foam::axesRotation::Tr() const { NotImplemented; @@ -263,34 +298,28 @@ Foam::symmTensor Foam::axesRotation::transformVector void Foam::axesRotation::operator=(const dictionary& dict) { - if (debug) - { - Pout<< "axesRotation::operator=(const dictionary&) : " - << "assign from " << dict << endl; - } - vector axis1, axis2; - axisOrder order(e3e1); if (dict.readIfPresent("e1", axis1) && dict.readIfPresent("e2", axis2)) { - order = e1e2; + setTransform(axis1, axis2, E1_E2); } - else if (dict.readIfPresent("e2", axis1)&& dict.readIfPresent("e3", axis2)) + else if (dict.readIfPresent("e2", axis1) && dict.readIfPresent("e3", axis2)) { - order = e2e3; + setTransform(axis1, axis2, E2_E3); } - else if (dict.readIfPresent("e3", axis1)&& dict.readIfPresent("e1", axis2)) + else if (dict.readIfPresent("e3", axis1) && dict.readIfPresent("e1", axis2)) { - order = e3e1; + setTransform(axis1, axis2, E3_E1); } else if (dict.found("axis") || dict.found("direction")) { // Both "axis" and "direction" are required // If one is missing the appropriate error message will be generated - order = e3e1; dict.lookup("axis") >> axis1; dict.lookup("direction") >> axis2; + + setTransform(axis1, axis2, E3_E1); } else { @@ -299,16 +328,6 @@ void Foam::axesRotation::operator=(const dictionary& dict) << "found " << exit(FatalError); } - - calcTransform(axis1, axis2, order); -} - - -void Foam::axesRotation::write(Ostream& os) const -{ - os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl; - os.writeKeyword("e2") << e2() << token::END_STATEMENT << nl; - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H index 2f51342ba4..ca974fc0e9 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H +++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,11 +25,12 @@ Class Foam::axesRotation Description - A coordinate rotation specified using global axis + A coordinate rotation specified using global axes The rotation is defined by a combination of vectors (e1/e2), (e2/e3) or (e3/e1). Any nonorthogonality will be absorbed into the second - vector. + vector. In terms of cylindrical coordinates, the 'axis' would + correspond to the \a z-axis and the 'direction' to the \a r-axis. \verbatim axesRotation @@ -66,6 +67,20 @@ class axesRotation : public coordinateRotation { +public: + + //- The order/combination of local axes for the axes-rotation definition + // Note that these follow the right-hand rule. + enum axisOrder + { + E1_E2, //!< The axis is X-dominant, the direction is Y-dominant + E2_E3, //!< The axis is Y-dominant, the direction is Z-dominant + E3_E1 //!< The axis is Z-dominant, the direction is X-dominant + }; + + +private: + // Private data //- Local-to-Global transformation tensor @@ -74,24 +89,6 @@ class axesRotation //- Global-to-Local transformation tensor tensor Rtr_; - //- The combination of local axes to be used - enum axisOrder - { - e1e2, - e2e3, - e3e1 - }; - - // Private Member Functions - - //- Calculate transformation tensor - void calcTransform - ( - const vector& axis1, - const vector& axis2, - const axisOrder& order = e3e1 - ); - public: @@ -103,20 +100,34 @@ public: //- Construct null axesRotation(); - //- Construct from 2 axes - axesRotation(const vector& axis, const vector& dir); + //- Construct as copy + axesRotation(const axesRotation& r); + + //- Construct from local to global rotation matrix + explicit axesRotation(const tensor& R); + + //- Construct from two axes (axis and direction) + axesRotation + ( + const vector& axis, + const vector& dir, + const axisOrder& order = E3_E1 + ); + + //- Construct from a single axis using a best-guess for the second axis + // For the best-guess, the largest component value and sign of the + // axis determines the direction orientation. + explicit axesRotation(const vector& axis); //- Construct from dictionary - axesRotation(const dictionary&); + explicit axesRotation(const dictionary& dict); - //- Construct from components - axesRotation(const tensor& R); - - //- Construct from dictionary and mesh - axesRotation(const dictionary&, const objectRegistry&); - - //- Construct as copy - axesRotation(const axesRotation&); + //- Construct from dictionary and a registry (typically a mesh) + axesRotation + ( + const dictionary& dict, + const objectRegistry& unused + ); //- Return clone autoPtr clone() const @@ -139,6 +150,14 @@ public: Rtr_ = sphericalTensor::I; } + //- Set the transformation tensors from two axes (axis and direction) + void setTransform + ( + const vector& axis1, + const vector& axis2, + const axisOrder& order = E3_E1 + ); + //- Update the rotation for a list of cells virtual void updateCells(const polyMesh&, const labelList&) {} @@ -216,13 +235,8 @@ public: // Member Operators //- Assign from dictionary - void operator=(const dictionary&); + void operator=(const dictionary& dict); - - // Write - - //- Write - virtual void write(Ostream&) const; }; diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C index c9ac59b609..57565dbc45 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,4 +74,13 @@ Foam::symmTensor Foam::coordinateRotation::transformPrincipal } + +void Foam::coordinateRotation::write(Ostream& os) const +{ + os.writeEntry("e1", e1()); + os.writeEntry("e2", e2()); + os.writeEntry("e3", e3()); +} + + // ************************************************************************* // diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H index bab113c3d0..3a8396b509 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H @@ -123,7 +123,8 @@ public: //- Select constructed from dictionary and objectRegistry static autoPtr New ( - const dictionary& dict, const objectRegistry& obr + const dictionary& dict, + const objectRegistry& obr ); //- Select constructed from dictionary @@ -216,8 +217,8 @@ public: // Write - //- Write - virtual void write(Ostream&) const = 0; + //- Write coordinateRotation as e1,e2,e3 vectors + virtual void write(Ostream& os) const; }; diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C index b1457329ff..feb473421c 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,26 +34,15 @@ Foam::autoPtr Foam::coordinateRotation::New const objectRegistry& obr ) { - if (debug) - { - Pout<< "coordinateRotation::New" - "(const dictionary&, const objectRegistry&) : " - << "constructing coordinateRotation" - << endl; - } - const word rotType = dict.lookup("type"); - objectRegistryConstructorTable::iterator cstrIter = - objectRegistryConstructorTablePtr_->find(rotType); + auto cstrIter = objectRegistryConstructorTablePtr_->cfind(rotType); if (!cstrIter.found()) { FatalIOErrorInFunction(dict) - << "Unknown coordinateRotation type " - << rotType << nl << nl + << "Unknown coordinateRotation type " << rotType << nl << nl << "Valid coordinateRotation types are :" << nl - << "[default: axes ]" << objectRegistryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } @@ -67,23 +56,14 @@ Foam::autoPtr Foam::coordinateRotation::New const dictionary& dict ) { - if (debug) - { - Pout<< "coordinateRotation::New(const dictionary&) : " - << "constructing coordinateRotation" - << endl; - } - const word rotType = dict.lookup("type"); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(rotType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(rotType); if (!cstrIter.found()) { FatalIOErrorInFunction(dict) - << "Unknown coordinateRotation type " - << rotType << nl << nl + << "Unknown coordinateRotation type " << rotType << nl << nl << "Valid coordinateRotation types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C index 8a04eedeed..3ebc07d442 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C @@ -67,7 +67,7 @@ void Foam::cylindrical::init tensorField& R = Rptr_(); forAll(cells, i) { - label celli = cells[i]; + const label celli = cells[i]; vector dir = cc[celli] - origin_; dir /= mag(dir) + VSMALL; @@ -92,6 +92,40 @@ void Foam::cylindrical::init // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +Foam::cylindrical::cylindrical(const cylindrical& r) +: + Rptr_(r.Rptr_, false), // clone + origin_(r.origin_), + e3_(r.e3_) +{} + + +Foam::cylindrical::cylindrical(const tensorField& R) +: + Rptr_(), + origin_(Zero), + e3_(Zero) +{ + Rptr_() = R; +} + + +Foam::cylindrical::cylindrical(const dictionary& dict) +: + Rptr_(), + origin_(), + e3_() +{ + FatalErrorInFunction + << " cylindrical can not be constructed from dictionary " + << " use the construtctor : " + "(" + " const dictionary&, const objectRegistry&" + ")" + << exit(FatalIOError); +} + + Foam::cylindrical::cylindrical ( const dictionary& dict, @@ -103,12 +137,9 @@ Foam::cylindrical::cylindrical e3_(Zero) { // If origin is specified in the coordinateSystem - if (dict.parent().found("origin")) - { - dict.parent().lookup("origin") >> origin_; - } + dict.parent().readIfPresent("origin", origin_); - // rotation axis + // Rotation axis dict.lookup("e3") >> e3_; init(obr); @@ -146,40 +177,6 @@ Foam::cylindrical::cylindrical } -Foam::cylindrical::cylindrical(const dictionary& dict) -: - Rptr_(), - origin_(), - e3_() -{ - FatalErrorInFunction - << " cylindrical can not be constructed from dictionary " - << " use the construtctor : " - "(" - " const dictionary&, const objectRegistry&" - ")" - << exit(FatalIOError); -} - - -Foam::cylindrical::cylindrical(const tensorField& R) -: - Rptr_(), - origin_(Zero), - e3_(Zero) -{ - Rptr_() = R; -} - - -Foam::cylindrical::cylindrical(const cylindrical& r) -: - Rptr_(r.Rptr_, false), // clone - origin_(r.origin_), - e3_(r.e3_) -{} - - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // @@ -360,7 +357,7 @@ Foam::symmTensor Foam::cylindrical::transformVector void Foam::cylindrical::write(Ostream& os) const { - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; + os.writeEntry("e3", e3()); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H index ff7f838420..2baca6682c 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H +++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H @@ -60,7 +60,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cylindrical Declaration + Class cylindrical Declaration \*---------------------------------------------------------------------------*/ class cylindrical @@ -96,13 +96,22 @@ public: // Constructors + //- Construct as copy + cylindrical(const cylindrical& r); + + //- Construct from tensor Field + explicit cylindrical(const tensorField& R); + + //- Construct from dictionary - for API compatibility only + explicit cylindrical(const dictionary& dict); + //- Construct from dictionary and objectRegistry - cylindrical(const dictionary&, const objectRegistry&); + cylindrical(const dictionary& dict, const objectRegistry& obr); //- Construct from components for all cells cylindrical ( - const objectRegistry&, + const objectRegistry& obr, const vector& axis, const point& origin ); @@ -110,21 +119,12 @@ public: //- Construct from components for list of cells cylindrical ( - const objectRegistry&, + const objectRegistry& obr, const vector& axis, const point& origin, const List