Added SIGINT handler to the fog console

Previously ^C would exit the fog console.

Now ^C is handled and ^D, exit or quit must by typed to exit the
console.  This fixes a major personal annoyance of mine as the fog
console did not behave like IRB or like the shell when you wanted to use
^C to clear what you had just typed.
This commit is contained in:
Eric Hodel 2012-12-06 15:41:34 -08:00
parent 11591b3ed9
commit 3ef31ce551
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ else
@irb.context.prompt_mode = :FOG
@irb.context.workspace = IRB::WorkSpace.new(binding)
trap 'INT' do
@irb.signal_handle
end
Formatador.display_line('Welcome to fog interactive!')
Formatador.display_line(":#{Fog.credential} provides #{providers}")
providers = Fog.providers