parseArgs function

String parseArgs(
  1. List<String> args
)

Implementation

String parseArgs(List<String> args) {
  final commandList = args
      .map(
        (arg) => arg
            .replaceAll(' ', '\\ ')
            .replaceAll('(', '\\(')
            .replaceAll(')', '\\)')
            .replaceAll('\'', '\\\''),
      )
      .toList();

  return commandList.join(' ');
}