Shell completions through Options
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 7 Feb 2014 18:52:53 +0000 (20:52 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sun, 9 Feb 2014 17:32:23 +0000 (19:32 +0200)
commit127810545b23a733b1e70d5f18c8fc1bb76e0cc1
tree25f4e529ca7467a5850d9b8a9c2a7ffe5c080298
parent002d151cc9e46230554384c2d0a078777eb7d074
Shell completions through Options

- Implement shell completion generation for command line options
  specified through an Options object.
- Use this support to generate the list of options for the wrapper
  binary instead of hardcoding them.
- Use this support and the conversion from t_pargs/t_filenm to Options
  to generate the existing completions.  The only differences in the
  generated completions are in the order of the options and in changing
  "$n == 1" to "$n <= 1" and ".@(xtc|trr|...)" to "@(.xtc|.trr|...)".
- Extend some of the options to expose information necessary for this.

Related to #969 and #1410.

Change-Id: Ib77543367c38803ef186f6024a1af14feb806d80
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/commandline/pargs.cpp
src/gromacs/commandline/shellcompletions.cpp
src/gromacs/commandline/shellcompletions.h
src/gromacs/options/basicoptions.cpp
src/gromacs/options/basicoptions.h
src/gromacs/options/basicoptionstorage.h
src/gromacs/options/filenameoption.cpp
src/gromacs/options/filenameoption.h
src/gromacs/options/filenameoptionstorage.h
src/gromacs/utility/stringutil.h