mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	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:
		
							parent
							
								
									11591b3ed9
								
							
						
					
					
						commit
						3ef31ce551
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		
							
								
								
									
										4
									
								
								bin/fog
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue