harp 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/harp/repl.rb +4 -1
- metadata +2 -2
data/lib/harp/repl.rb
CHANGED
@@ -8,6 +8,7 @@ Readline.completion_append_character = nil
|
|
8
8
|
module Harp
|
9
9
|
|
10
10
|
class REPL
|
11
|
+
Prompt = "<3: "
|
11
12
|
|
12
13
|
def initialize(command_manager)
|
13
14
|
@command_manager = command_manager
|
@@ -67,7 +68,9 @@ module Harp
|
|
67
68
|
@completions = context.completions rescue Set.new
|
68
69
|
@run = true
|
69
70
|
puts
|
70
|
-
|
71
|
+
stty_save = `stty -g`.chomp
|
72
|
+
trap("INT") { system "stty", stty_save; exit }
|
73
|
+
while @run && (line = Readline.readline(Prompt, true).strip)
|
71
74
|
# Treat ! as the shell out command
|
72
75
|
if line[0] == "!"
|
73
76
|
system(line.slice(1..-1))
|
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.
|
4
|
+
version: 0.2.8
|
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:
|
12
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: starter
|