From 3ef31ce5516071a3130fde3a029ff5e3d0c9e8ce Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 6 Dec 2012 15:41:34 -0800 Subject: [PATCH] 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. --- bin/fog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/fog b/bin/fog index ff3c7522b..c57f9b7b5 100755 --- a/bin/fog +++ b/bin/fog @@ -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