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