openfoam/etc/config.csh/tcsh_completion
Mark Olesen 110b00f048 ENH: improved handling of gmp/mpfr library settings (issue #674)
- export library path for gmp/mpfr from CGAL config files.
  This is required when non-system gmp/mpfr libraries are being
  used, but not using a ThirdParty compiler installation.

- automatically handle lib/ vs lib64/ (eg, for central installations)
  for packages such as boost, CGAL, etc. While the ThirdParty
  compilation of these will normally land in lib64/, this may not be
  the case when they are supplied by another means.

- reworked the handling of foamEtcFile and foamCleanPath for less
  clutter in the configuration files.
  Added the bin/tools/lib-dir script to handle logic that is
  too complex to easily manage in csh.
2018-01-11 01:30:23 +01:00

50 lines
1.8 KiB
Bash

#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# File
# etc/config.csh/tcsh_completion
# - sourced by OpenFOAM-*/etc/cshrc
#
# Description
# Tcsh completions for OpenFOAM applications
# Using bash completion for the hard work
#
# Requires
# bash 4.2 or newer
#
#------------------------------------------------------------------------------
if ($?tcsh) then # tcsh only
# Remove old completions, which look like:
# complete APPNAME 'p,*,`bash $WM_PROJECT_DIR/etc/ ...
foreach appName (`complete | sed -ne '/WM_PROJECT/s/\t.*$//p'`)
uncomplete $appName
end
# Generate completions for predefined directories (if support is possible)
bash $WM_PROJECT_DIR/etc/config.csh/complete-wrapper -test
if ($status == 0) then
foreach dirName ("$FOAM_APPBIN")
if ( ! -d $dirName ) continue
foreach appName (`find $dirName -maxdepth 1 -executable -type f`)
# Pass explicitly
## complete $appName:t 'p,*,`bash $WM_PROJECT_DIR/etc/config.csh/complete-wrapper '$appName:t' "${COMMAND_LINE}"`,'
# Pass via environment
complete $appName:t 'p,*,`bash $WM_PROJECT_DIR/etc/config.csh/complete-wrapper '$appName:t'`,'
end
end
endif
endif
#------------------------------------------------------------------------------