File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ function M.send(text, opts)
5555 terminal .send (text , opts or {})
5656end
5757
58- -- TODO: How to press "enter" after?
59- -- I don't understand why it works fine with `ask`
6058function M .command (command , opts )
6159 terminal .command (command , opts or {})
6260end
Original file line number Diff line number Diff line change 6464--- Send a command to the terminal
6565--- @param command string opencode command (e.g. " /new" )
6666--- @param opts ? opencode.Config Optional config that will override the base config for this call only
67+ -- FIX: How to press "enter" after?
68+ -- I don't understand why it works fine with `ask`.
69+ -- That uses multi-line, which ends with \r.
70+ -- But single line uses \n.
71+ -- I tried sending commands with multi-line but it just sends the actual text - doesn't select the command.
72+ -- Maybe we need to send the text, wait a moment for the menu to appear, and then send the enter key?
6773function M .command (command , opts )
6874 M .send (command , opts , false )
6975end
You can’t perform that action at this time.
0 commit comments