djinni 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/djinni.rb +16 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 809f6b2c46775260aaf7b20f0b9f92cae02e25c9
|
4
|
+
data.tar.gz: 80329cf9d65f0d40cda86ed64f6a6ba9d4ff49d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
-
|
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
|