summaryrefslogtreecommitdiff
path: root/vendor/github.com/charmbracelet/x/ansi/iterm2.go
blob: 0ecb336da1693690e34536cd4d72a685e5411d3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package ansi

import "fmt"

// ITerm2 returns a sequence that uses the iTerm2 proprietary protocol. Use the
// iterm2 package for a more convenient API.
//
//	OSC 1337 ; key = value ST
//
// Example:
//
//	ITerm2(iterm2.File{...})
//
// See https://iterm2.com/documentation-escape-codes.html
// See https://iterm2.com/documentation-images.html
func ITerm2(data any) string {
	return "\x1b]1337;" + fmt.Sprint(data) + "\x07"
}