I am wondering how to create the appearance of a "full-screen" window inside a shell, as in vim, emacs, etc. Is it possible to do this programmatically in Ruby? And how platform-dependent would that be?
Edit: I am not looking for how to make my shell go full-screen. I'm looking for a way to hide the previous commands entered and "fill" the shell screen with an app. It's for an installer.
What you're probably looking for is ncurses or S-Lang support to provide your full TUI experience.
Ruby's gem
environment provides several gems that might be worth exploring:
$ gem list --remote | grep -i curses
cursesx (003)
ffi-ncurses (0.4.0)
ncurses (0.9.1)
ncurses-ruby (1.2.1)
ncursesw (1.2.4.3)
snowleopard-ncurses (1.2.4)
The author of the rbcurse
package recommends using the ncurses-ruby
gem. rbcurse
provides some pre-written widgets and the ability to write new widgets in the same style -- it looks mighty useful.
I haven't yet found any S-Lang bindings for Ruby; based on the project's focus on providing a language interpreter, I just don't think it'll be easy to build Ruby bindings. Pity, because many application authors do prefer S-Lang over ncurses.
You could use ncurses
for things like that. It provides an abstraction layer to your terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With