iterm2.go

 1package ansi
 2
 3import "fmt"
 4
 5// ITerm2 returns a sequence that uses the iTerm2 proprietary protocol. Use the
 6// iterm2 package for a more convenient API.
 7//
 8//	OSC 1337 ; key = value ST
 9//
10// Example:
11//
12//	ITerm2(iterm2.File{...})
13//
14// See https://iterm2.com/documentation-escape-codes.html
15// See https://iterm2.com/documentation-images.html
16func ITerm2(data any) string {
17	return "\x1b]1337;" + fmt.Sprint(data) + "\x07"
18}