-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcommon.go
More file actions
105 lines (102 loc) · 2.26 KB
/
Copy pathcommon.go
File metadata and controls
105 lines (102 loc) · 2.26 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package keys
import "github.com/charmbracelet/bubbles/key"
type common struct {
Plan key.Binding
PlanDestroy key.Binding
AutoApply key.Binding
Destroy key.Binding
Cancel key.Binding
Delete key.Binding
Execute key.Binding
State key.Binding
Retry key.Binding
Reload key.Binding
Edit key.Binding
Init key.Binding
InitUpgrade key.Binding
InitReconfigure key.Binding
Validate key.Binding
Format key.Binding
Cost key.Binding
LastTask key.Binding
Back key.Binding
}
// Keys shared by several models.
var Common = common{
Plan: key.NewBinding(
key.WithKeys("p"),
key.WithHelp("p", "plan"),
),
PlanDestroy: key.NewBinding(
key.WithKeys("d"),
key.WithHelp("d", "plan destroy"),
),
AutoApply: key.NewBinding(
key.WithKeys("a"),
key.WithHelp("a", "auto-apply"),
),
Destroy: key.NewBinding(
key.WithKeys("D"),
key.WithHelp("D", "destroy"),
),
Cancel: key.NewBinding(
key.WithKeys("c"),
key.WithHelp("c", "cancel"),
),
Delete: key.NewBinding(
key.WithKeys("delete"),
key.WithHelp("delete", "delete"),
),
Execute: key.NewBinding(
key.WithKeys("x"),
key.WithHelp("x", "execute program"),
),
State: key.NewBinding(
key.WithKeys("s"),
key.WithHelp("s", "state"),
),
Retry: key.NewBinding(
key.WithKeys("r"),
key.WithHelp("r", "retry"),
),
Reload: key.NewBinding(
key.WithKeys("ctrl+r"),
key.WithHelp("ctrl+r", "reload"),
),
Edit: key.NewBinding(
key.WithKeys("E"),
key.WithHelp("E", "edit"),
),
Init: key.NewBinding(
key.WithKeys("i"),
key.WithHelp("i", "init"),
),
InitUpgrade: key.NewBinding(
key.WithKeys("u"),
key.WithHelp("u", "init -upgrade"),
),
InitReconfigure: key.NewBinding(
key.WithKeys("R"),
key.WithHelp("R", "init -reconfigure"),
),
Validate: key.NewBinding(
key.WithKeys("v"),
key.WithHelp("v", "validate"),
),
Format: key.NewBinding(
key.WithKeys("f"),
key.WithHelp("f", "format"),
),
Cost: key.NewBinding(
key.WithKeys("$"),
key.WithHelp("$", "cost"),
),
LastTask: key.NewBinding(
key.WithKeys("o"),
key.WithHelp("o", "last task output"),
),
Back: key.NewBinding(
key.WithKeys("esc"),
key.WithHelp("esc", "back"),
),
}