Skip to content

Instantly share code, notes, and snippets.

@ninmonkey
Created October 12, 2025 20:50
Show Gist options
  • Select an option

  • Save ninmonkey/264c826d3d08eb88a85f7c59d34d34af to your computer and use it in GitHub Desktop.

Select an option

Save ninmonkey/264c826d3d08eb88a85f7c59d34d34af to your computer and use it in GitHub Desktop.
Tiny Escape Control Char Pwsh7
filter EscapeCC {
($_)?.EnumerateRunes() | % {
($_.Value -le 32) ? [Text.Rune]( $_.Value + 0x2400 ) : $_
} | Join-String
}
"sdf `a sdjf hi world`t`n ${fg:#feaa99} more stuff `u{0} `r`n blah" | escapeCC
# outputs: sdf␠␇␠sdjf␠hi␠world␉␊␠␛[38;2;254;170;153m␠more␠stuff␠␀␠␍␊␠blah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment