%N keymatch %F $MIR/src/subs/options.for
%D Get, with minimum match, command line options.
%: user-input
%B
      subroutine keymatch (key, ntype, types, maxout, out, nout)
      implicit none

      integer ntype, nout, maxout
      character*(*) types(ntype), out(maxout), key

     Get a list of inputs for one keyword from the user and expand them
     for minimum match compared to a list of possible inputs.
     This will generate an error if there is an ambiguous option.

  Inputs:
    key        The task keyword to use.
    type       An array of possible input values. These should be in lower
               case.
    ntype      The number of possible input types
    maxout     Maximum number of output values
  Output:
    out        The expanded keyword list.  Will be all blank
               if no values given
    nout       The number of output values in out.
