mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 03:25:50 +00:00
For a hardcoded set of control characters, replace them with spaces when encoding pasted text. This is to prevent unsafe control characters from being pasted which could trick a user into executing commands unexpectedly. This happens regardless of bracketed paste mode, because certain characters processed by the kernel pty line discipline can break bracketed paste (source from zsh: https://zsh-workers.zsh.narkive.com/Kd3evJ7t/bracketed-paste-mode-in-xterm-and-urxvt). This behavior is based on xterm's behavior, including the list of characters. Note that as a comment in the code says, we should be sourcing some of these from a tcgetattr call instead of hardcoding them, but this is a good start.
77 lines
1.2 KiB
TOML
77 lines
1.2 KiB
TOML
[files]
|
|
extend-exclude = [
|
|
# Build
|
|
"build.zig.zon",
|
|
"build.zig.zon.nix",
|
|
"build.zig.zon.txt",
|
|
"build.zig.zon.json",
|
|
# Build artifacts
|
|
"macos/build/*",
|
|
"zig-out/*",
|
|
# vendored code
|
|
"vendor/*",
|
|
"pkg/*",
|
|
"src/stb/*",
|
|
# "grey" color names are valid
|
|
"src/terminal/res/rgb.txt",
|
|
# Do not self-check
|
|
"typos.toml",
|
|
# Fonts
|
|
"*.ttf",
|
|
"*.otf",
|
|
"*.bdf",
|
|
# Images
|
|
"*.png",
|
|
"*.ico",
|
|
"*.icns",
|
|
# Valgrind nonsense
|
|
"valgrind.supp",
|
|
# Other
|
|
"*.pdf",
|
|
"*.data",
|
|
"*.xib",
|
|
"src/cli/lorem_ipsum.txt",
|
|
]
|
|
|
|
[default]
|
|
extend-ignore-re = [
|
|
# Ignore typos in test expectations
|
|
"testing\\.expect[^;]*;",
|
|
"kHOM\\d*",
|
|
# Ignore "typos" in sprite font draw fn names
|
|
"draw[0-9A-F]+(_[0-9A-F]+)?\\(",
|
|
# Ignore test data in src/input/paste.zig
|
|
"\"hel\\\\x",
|
|
]
|
|
|
|
[default.extend-words]
|
|
Pn = "Pn"
|
|
thr = "thr"
|
|
# Swift oddities
|
|
Requestor = "Requestor"
|
|
iterm = "iterm"
|
|
ACCES = "ACCES"
|
|
wdth = "wdth"
|
|
Strat = "Strat"
|
|
grey = "gray"
|
|
greyscale = "grayscale"
|
|
DECID = "DECID"
|
|
flate = "flate"
|
|
typ = "typ"
|
|
kend = "kend"
|
|
# Tai Tham is a script/writing system
|
|
Tham = "Tham"
|
|
# GTK
|
|
GIR = "GIR"
|
|
# terminfo
|
|
rin = "rin"
|
|
# sprites
|
|
ower = "ower"
|
|
|
|
[type.po]
|
|
extend-glob = ["*.po"]
|
|
check-file = false
|
|
|
|
[type.swift.extend-words]
|
|
inout = "inout"
|