completionCommand abstract method
A command, in this dialect, that prints TAB-completion candidates for
word — one per line, each a full replacement for the typed word (so it
includes whatever was typed), with directories suffixed / so the editor
can avoid appending a trailing space.
When isCommand is true and word has no path separator, the word is in
command position and completes against executables on $PATH (plus the
shell's own builtins/cmdlets where natural); otherwise it globs paths.
Run as a one-off exec on the node, in the matching shell family (see
resolveShellInvocation's shellFamily hint), so the snippet's syntax is
understood and $PATH/cwd match the interactive session.
Implementation
String completionCommand(String word, {required bool isCommand});