From 5c607bb80160e29947a091c4958440cd5c7ec0bb Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 14 Dec 2017 12:50:59 +0100 Subject: [PATCH] ENH: print paraFoam -help and -help-full to stdout - this makes it possible to use "foamAddCompletion paraFoam" and have bash completions for paraFoam as well --- bin/paraFoam | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/bin/paraFoam b/bin/paraFoam index 6f1e2fe604..913ffa5bcf 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -4,37 +4,24 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------- # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # Script # paraFoam # # Description -# Start paraview with the OpenFOAM libraries and reader modules. +# Start paraview with OpenFOAM libraries and reader modules. # # Note -# Combining -block or -builtin options with -region option yields +# Combining -block, -vtk, -builtin options with -region option yields # undefined behaviour #------------------------------------------------------------------------------ -usage() { - exec 1>&2 - while [ "$#" -ge 1 ]; do echo "$1"; shift; done +printHelp() { + # Print usage to stdout so that it can be captured for bash completion cat<