extractHeredocBaseCommand function

String? extractHeredocBaseCommand(
  1. String command
)

Extract the base command from a heredoc.

Implementation

String? extractHeredocBaseCommand(String command) {
  final match = RegExp(r'^(\S+)').firstMatch(command.trim());
  return match?.group(1);
}