djinni 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/djinni.rb +16 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63e49e6e7f4471141892800679e4e406a72ffc57
4
- data.tar.gz: 82fe3cba90710d8bddb62726b3234bcdbf816f97
3
+ metadata.gz: 809f6b2c46775260aaf7b20f0b9f92cae02e25c9
4
+ data.tar.gz: 80329cf9d65f0d40cda86ed64f6a6ba9d4ff49d4
5
5
  SHA512:
6
- metadata.gz: 6434bc220e969d532255fd1088c300697cb5be240b7a3f11090faaed3e1437d1f18aaa76fa21cb9748d3488844a3647db17f0656279ef3efa39753f70a85b025
7
- data.tar.gz: 3f5173d967ed690e16a4a25068ef8c2f4723048df12427092a39f996a6614761edd112806576dc5a08f7d155e84b1a0495a18bde508fd8e743521643f53de6eb
6
+ metadata.gz: 58a9bae6e1367b6df31df213a64ef8ee126373928f7b64a81b3bee3b4eaedbb513af0b39f94b068691afc2ae67f34b31aeda3bbccf204862c26a9eafae731dd7
7
+ data.tar.gz: e2b58de47795052fb682b6a161dff356e910c69ef498fd9efcf8c6ea6a23cc36af941159878a16ffe2003cc33b6f18632600e8acbbd89c5800509a705292d31d
data/lib/djinni.rb CHANGED
@@ -32,7 +32,15 @@ class Djinni
32
32
  return input if (!@wishes.has_key?(name))
33
33
 
34
34
  wish = @wishes[name]
35
- complete = wish.tab_complete(args, djinni_env)
35
+ complete = ""
36
+ begin
37
+ complete = wish.tab_complete(args, djinni_env)
38
+ rescue SystemExit => e
39
+ raise e
40
+ rescue Exception => e
41
+ puts
42
+ puts e.message
43
+ end
36
44
  return "#{name} #{complete}"
37
45
  else
38
46
  wishes = @wishes.keys
@@ -52,7 +60,13 @@ class Djinni
52
60
 
53
61
  @wishes.sort.map do |aliaz, wish|
54
62
  if (aliaz == name)
55
- wish.execute(args, djinni_env)
63
+ begin
64
+ wish.execute(args, djinni_env)
65
+ rescue SystemExit => e
66
+ raise e
67
+ rescue Exception => e
68
+ puts e.message
69
+ end
56
70
  store_history(input)
57
71
  return ""
58
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: djinni
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker