diff --git a/lib/yamatanooroti/vterm.rb b/lib/yamatanooroti/vterm.rb index c49b12b..7c29fe2 100644 --- a/lib/yamatanooroti/vterm.rb +++ b/lib/yamatanooroti/vterm.rb @@ -10,7 +10,8 @@ def start_terminal(height, width, command, wait: 0.01, timeout: 2, startup_messa @wait = wait @result = nil - @pty_output, @pty_input, @pid = PTY.spawn('bash', '-c', %[stty rows #{height.to_s} cols #{width.to_s}; "$@"], '--', *command) + @pty_output, @pty_input, @pid = PTY.spawn(*command) + @pty_output.winsize = [height, width] @vterm = VTerm.new(height, width) @vterm.set_utf8(true)