# and this shell supports extended globbing
if test -n "${BASH_VERSION+set}" && (complete) > /dev/null 2>&1; then
if (shopt -s extglob) > /dev/null 2>&1; then
+ shopt -s extglob
+ if [ -f $GMXBIN/gmx-completion.bash ]; then
+ source $GMXBIN/gmx-completion.bash
+ for cfile in $GMXBIN/gmx-completion-*.bash ; do
+ source $cfile
+ done
+ fi
+ fi
+elif test -n "${ZSH_VERSION+set}" > /dev/null 2>&1 ; then
+ autoload bashcompinit
+ if (bashcompinit) > /dev/null 2>&1; then
+ bashcompinit
if [ -f $GMXBIN/gmx-completion.bash ]; then
source $GMXBIN/gmx-completion.bash
for cfile in $GMXBIN/gmx-completion-*.bash ; do
done
fi
fi
-# read zsh completions if understand how to use them
-# Currently disabled, since the completions don't work with the new
-# gmx binary with subcommands.
-# Contributions to get the functionality back are welcome.
-#elif test -n "${ZSH_VERSION+set}" && compctl >& /dev/null; then
-# if [ -f $GMXBIN/gmx-completion.zsh ]; then
-# source $GMXBIN/gmx-completion.zsh;
-# fi
fi
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
void ShellCompletionWriter::startCompletions()
{
impl_->file_.reset(new File(impl_->binaryName_ + "-completion.bash", "w"));
- impl_->file_->writeLine("shopt -s extglob");
}
void ShellCompletionWriter::writeModuleCompletions(