Browse files

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.
  • Loading branch information...
1 parent 11591b3 commit 3ef31ce5516071a3130fde3a029ff5e3d0c9e8ce @drbrain drbrain committed Dec 6, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 bin/fog
@@ -37,6 +37,10 @@ else
@irb.context.prompt_mode = :FOG
@irb.context.workspace =
+ trap 'INT' do
+ @irb.signal_handle
+ end
Formatador.display_line('Welcome to fog interactive!')
Formatador.display_line(":#{Fog.credential} provides #{providers}")
providers = Fog.providers

0 comments on commit 3ef31ce

Please sign in to comment.