(p string)
| 16 | } |
| 17 | |
| 18 | func NewExecModel(p string) ExecModel { |
| 19 | ti := textinput.New() |
| 20 | ti.Placeholder = p |
| 21 | ti.Focus() |
| 22 | ti.CharLimit = 256 |
| 23 | ti.Width = 20 |
| 24 | |
| 25 | return ExecModel{ |
| 26 | textInput: ti, |
| 27 | err: nil, |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func (m ExecModel) Init() tea.Cmd { |
| 32 | return textinput.Blink |