Dynamically complete STUB from CANDIDATES list.
This function inserts completion characters at point by
completing STUB from the strings in CANDIDATES. If completion is
ambiguous, possibly show a completions listing in a separate
Return nil if no completion was inserted.
Return `sole' if completed with the only completion match.
Return `shortest' if completed with the shortest match.
Return `partial' if completed as far as possible.
Return `listed' if a completion listing was shown.
See also `comint-dynamic-complete-filename'. (fn STUB CANDIDATES)