class Vte::Terminal - vte3-3.1.1 Documentation

# class Vte::Terminal

### Public Instance Methods

feed_child(text) click to toggle source

    # File lib/vte3/terminal.rb, line 69
    def feed_child(text)
      feed_child_raw(text, text.bytesize)
    end

Also aliased as: feed_child_raw
feed_child_raw(text)
Alias for: feed_child
fork_command(options={}) click to toggle source

    # File lib/vte3/terminal.rb, line 20
    def fork_command(options={})
      pty_flags = options[:pty_flags] || PtyFlags::DEFAULT
      working_directory = options[:working_directory]
      argv = options[:argv] || [ENV["SHELL"] || "/bin/sh"]
      envv = options[:envv]
      default_spawn_flags =
        GLib::Spawn::CHILD_INHERITS_STDIN | GLib::Spawn::SEARCH_PATH
      spawn_flags = options[:spawn_flags] || default_spawn_flags
      succeeded, pid = fork_command_full(pty_flags,
                                         working_directory,
                                         argv,
                                         envv,
                                         spawn_flags)
      if succeeded
        pid
      else
        nil
      end
    end

pty() click to toggle source

    # File lib/vte3/terminal.rb, line 43
    def pty
      pty_object
    end

spawn(options) click to toggle source

    # File lib/vte3/terminal.rb, line 47
    def spawn(options)
      pty_flags = options[:pty_flags] || PtyFlags::DEFAULT
      working_directory = options[:working_directory]
      argv = options[:argv] || [ENV["SHELL"] || "/bin/sh"]
      envv = options[:envv]
      default_spawn_flags =
        GLib::Spawn::CHILD_INHERITS_STDIN | GLib::Spawn::SEARCH_PATH
      spawn_flags = options[:spawn_flags] || default_spawn_flags
      succeeded, pid = spawn_sync(pty_flags,
                                  working_directory,
                                  argv,
                                  envv,
                                  spawn_flags)
      if succeeded
        pid
      else
        nil
      end
    end