shellWord function

String shellWord(
  1. String value
)

value as one word of a command line for POSIX shells and Fish: as it is if it is a plain word, otherwise quoted with shellQuote.

Implementation

String shellWord(final String value) {
  return _plainShellWord.hasMatch(value) ? value : shellQuote(value);
}