wrapCommand method

  1. @override
String wrapCommand(
  1. String line, {
  2. required bool interactive,
  3. required String tail,
})
override

Wraps a user-typed line so it runs and is followed by tail (a marker) as one logical unit. interactive enables terminal-echo handling where the dialect needs it (POSIX only: no tty echo to toggle over a pipe; PowerShell's own prompt and echo of the line are filtered instead, see echoesInput).

Implementation

@override
String wrapCommand(
  String line, {
  required bool interactive,
  required String tail,
}) {
  // PowerShell statement separator. No tty echo to toggle over a pipe;
  // PowerShell's own echo of this line is filtered by the client. The
  // marker must ride on the same line (a program reading stdin would take a
  // line of its own as input), so [_quoteGap] keeps it out of error
  // messages that quote the line.
  return '$line$_quoteGap ; $tail';
}