summaryrefslogtreecommitdiff
path: root/vendor/github.com/muesli/termenv/ansi_compat.md
blob: 6b68a3a9ad17aee4b8a33e4f12b00ffef08e11fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
## Change Foreground Color

This command should enable a blue foreground color:

```bash
echo -ne "\033]10;#0000ff\007"
```

## Change Background Color

This command should enable a green background color:

```bash
echo -ne "\033]11;#00ff00\007"
```

## Change Cursor Color

This command should enable a red cursor color:

```bash
echo -ne "\033]12;#ff0000\007"
```

## Query Color Scheme

These two commands should print out the currently active color scheme:

```bash
echo -ne "\033]10;?\033\\"
echo -ne "\033]11;?\033\\"
```

## Query Cursor Position

This command should print out the current cursor position:

```bash
echo -ne "\033[6n"
```

## Set Window Title

This command should set the window title to "Test":

```bash
echo -ne "\033]2;Test\007" && sleep 10
```

## Bracketed paste

Enter this command, then paste a word from the clipboard. The text
displayed on the terminal should contain the codes `200~` and `201~`:

```bash
echo -ne "\033[?2004h" && sleep 10
```

## Trigger Notification

This command should trigger a notification:

```bash
echo -ne "\033]777;notify;Title;Body\033\\"
```