harp 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/harp/repl.rb +8 -1
  2. metadata +2 -2
@@ -84,8 +84,15 @@ module Harp
84
84
  @completions = context.completions rescue Set.new
85
85
  @run = true
86
86
  puts
87
+
87
88
  stty_save = `stty -g`.chomp
88
- trap("INT") { system "stty", stty_save; exit }
89
+ kill_handler = proc do
90
+ system("stty", stty_save)
91
+ exit
92
+ end
93
+ trap("INT", kill_handler)
94
+ trap("TERM", kill_handler)
95
+
89
96
  while @run && (line = Readline.readline(Prompt, true).strip)
90
97
 
91
98
  # Don't fill history with immediate duplicates.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: starter