src/Pure/System/bash.scala
changeset 67200 d49727160f0a
parent 65317 b9f5cd845616
child 71601 97ccf48c2f0c
equal deleted inserted replaced
67199:93600ca0c8d9 67200:d49727160f0a
    22       case '\t' => "$'\\t'"
    22       case '\t' => "$'\\t'"
    23       case '\n' => "$'\\n'"
    23       case '\n' => "$'\\n'"
    24       case '\f' => "$'\\f'"
    24       case '\f' => "$'\\f'"
    25       case '\r' => "$'\\r'"
    25       case '\r' => "$'\\r'"
    26       case _ =>
    26       case _ =>
    27         if (Symbol.is_ascii_letter(ch) || Symbol.is_ascii_digit(ch) || "+-./:_".contains(ch))
    27         if (Symbol.is_ascii_letter(ch) || Symbol.is_ascii_digit(ch) || "+,-./:_".contains(ch))
    28           Symbol.ascii(ch)
    28           Symbol.ascii(ch)
    29         else if (c < 0) "$'\\x" + Integer.toHexString(256 + c) + "'"
    29         else if (c < 0) "$'\\x" + Integer.toHexString(256 + c) + "'"
    30         else if (c < 16) "$'\\x0" + Integer.toHexString(c) + "'"
    30         else if (c < 16) "$'\\x0" + Integer.toHexString(c) + "'"
    31         else if (c < 32 || c >= 127) "$'\\x" + Integer.toHexString(c) + "'"
    31         else if (c < 32 || c >= 127) "$'\\x" + Integer.toHexString(c) + "'"
    32         else  "\\" + ch
    32         else  "\\" + ch