Fixes to filename shell completions
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 28 Jan 2014 20:37:21 +0000 (22:37 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 29 Jan 2014 21:22:36 +0000 (22:22 +0100)
commit0d31fa51baa0b5788228631578f18509f68cb273
treeb2d5559da243e41711223f8b5f86fc2df3ee69b3
parentea99912691d0385f4d614c0383aefed35f67adc1
Fixes to filename shell completions

- When completing a file name, don't add a space after a directory name
  has been completed.
- Don't exclude directory names starting with . from the completions.
  This also excludes ../foobar/.
- Use a more reasonable pattern to match the file names: expect exactly
  one of the acceptable extensions, and at most one .gz/.Z extension.
- Complete directory names for mdrun -multidir.

Issues that remain:
- Completions for paths that contain spaces doesn't really work.
  The only difference to earlier behavior is that now, completing
  something that starts with a " gets an appended space before the
  closing ".
- When completing to subdirectories, the list of possible completions
  shows the subdirectory for each alternative.  This doesn't happen with
  standard bash completion.  Not sure whether this is feasible to fix.

Part of #1410 and #1159.

Change-Id: I1aff3ab89419e0ed4b53bc998c9a50b9a1879e9c
src/gromacs/commandline/shellcompletions.cpp
src/programs/CMakeLists.txt