Improve interactive selection input
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 12 Mar 2014 19:47:42 +0000 (21:47 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 18 Mar 2014 08:50:12 +0000 (09:50 +0100)
commit6f957f147b4ce3a1c8130536a6c85b63749d8553
treeb0e4276048c46c8087124f4f142cfc90c8eaf868
parent5ce5d9f459e29c8fe4ffa0f60e7cdf022bcb7142
Improve interactive selection input

- Print the static index groups always at the start of the prompt.
- Add a hint for that an empty line provides information about the
  available index groups.
- Print the whole prompt again after an empty input line.
- Print only the selections from the current interactive prompt in the
  output.  This makes the listing clearer for commands like
    gmx sasa -surface -output
  when providing the latter set of selections interactively.
- Print the number of selections still required after the above list.
- Work better (on Unix) if stdin is from a pipe (using the same
  mechanism that was there in 4.5 and 4.6).

Change-Id: I38152fb4fccd142aeee318739ab3782fa6a775d8
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selectioncollection.h
src/gromacs/selection/selectionoptionmanager.cpp
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/utility/file.cpp
src/gromacs/utility/file.h