Skip to content

Instantly share code, notes, and snippets.

@Integralist
Created December 1, 2025 18:10
Show Gist options
  • Select an option

  • Save Integralist/0806877ca40ffd18fcabafad0696cb35 to your computer and use it in GitHub Desktop.

Select an option

Save Integralist/0806877ca40ffd18fcabafad0696cb35 to your computer and use it in GitHub Desktop.
Remove ASCII escape codes from delta
# use perl to strip ASCII escape codes so we can copy delta's diff output
# this is because unlike `git diff` there is no `--no-color` flag.
# and using the classic `diff` is just hard to decipher
delta foo.yaml bar.yaml | perl -pe 's/\x1b\[[0-9;]*[mK]//g' | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment