shh 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,13 +10,14 @@ module Shh
10
10
  end
11
11
 
12
12
  def main_loop
13
- prompt_text = ' > '
13
+ prompt_text = 'shh > '
14
14
 
15
15
  begin
16
- while line = Readline.readline(prompt_text, true).strip
16
+ while line = Readline.readline(prompt_text, true)
17
+ line.strip!
17
18
  case line
18
19
  when 'quit'
19
- return
20
+ break
20
21
  when 'refresh'
21
22
  refresh
22
23
  when 'list'
@@ -26,10 +27,12 @@ module Shh
26
27
  when /^edit (.*)/
27
28
  edit $1
28
29
  end
30
+ puts
29
31
  end
30
32
  rescue Interrupt => e
31
- return
33
+ exit
32
34
  end
35
+ puts
33
36
  end
34
37
 
35
38
  def refresh
@@ -60,4 +63,4 @@ module Shh
60
63
  refresh
61
64
  end
62
65
  end
63
- end
66
+ end
@@ -9,13 +9,14 @@ module Shh
9
9
  end
10
10
 
11
11
  def main_loop
12
- prompt_text = "(#{@hash['name']}) > "
12
+ prompt_text = "shh:#{@hash['name']} > "
13
13
 
14
14
  begin
15
- while line = Readline.readline(prompt_text, true).strip
15
+ while line = Readline.readline(prompt_text, true)
16
+ line.strip!
16
17
  case line
17
18
  when 'quit'
18
- return @hash
19
+ break
19
20
  when 'list'
20
21
  say(@hash.keys.sort.join(','))
21
22
  when /^edit (.*)/
@@ -33,8 +34,11 @@ module Shh
33
34
  end
34
35
  end
35
36
  rescue Interrupt => e
36
- return @hash
37
+ exit
37
38
  end
39
+
40
+ puts
41
+ @hash
38
42
  end
39
43
 
40
44
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Ryall