Class: Vte::Terminal
- Inherits:
-
Object
- Object
- Vte::Terminal
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/vte3/terminal.rb,
lib/vte3/deprecated.rb
Instance Method Summary collapse
- #feed_child(text) ⇒ Object
- #feed_child_raw ⇒ Object
- #fork_command(options = {}) ⇒ Object (also: #spawn)
- #pty ⇒ Object
- #pty_raw ⇒ Object
Instance Method Details
#feed_child(text) ⇒ Object
69 70 71 |
# File 'lib/vte3/terminal.rb', line 69 def feed_child(text) feed_child_raw(text, text.bytesize) end |
#feed_child_raw ⇒ Object
68 |
# File 'lib/vte3/terminal.rb', line 68 alias_method :feed_child_raw, :feed_child |
#fork_command(options = {}) ⇒ Object Also known as: spawn
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/vte3/terminal.rb', line 20 def fork_command(={}) pty_flags = [:pty_flags] || PtyFlags::DEFAULT working_directory = [:working_directory] argv = [:argv] || [ENV["SHELL"] || "/bin/sh"] envv = [:envv] default_spawn_flags = GLib::Spawn::CHILD_INHERITS_STDIN | GLib::Spawn::SEARCH_PATH spawn_flags = [: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 ⇒ Object
43 44 45 |
# File 'lib/vte3/terminal.rb', line 43 def pty pty_object end |
#pty_raw ⇒ Object
42 |
# File 'lib/vte3/terminal.rb', line 42 alias_method :pty_raw, :pty |