]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm/term.go
Improve and add comments
[safcm/safcm.git] / cmd / safcm / term.go
index d7568e47c4d6dd7b80576011d1aa19e446bb14ba..47f7d62cc1b14fe0ddbe3239d597e1d9f4b68ecc 100644 (file)
@@ -57,7 +57,8 @@ func ColorString(isTTY bool, color Color, x string) string {
 var escapeRegexp = regexp.MustCompile(`[\x00-\x08\x0B-\x1F\x7F]`)
 
 // EscapeControlCharacters escapes all ASCII control characters (except
-// newline and tab) by replacing them with their hex value.
+// newline and tab) by replacing them with their hex value. If the output is
+// to a TTY then the escaped characters are colored.
 //
 // This function must be used when displaying any input from remote hosts to
 // prevent terminal escape code injections.