shell_explain 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -0
- data/README.md +9 -2
- data/bin/explain +5 -5
- data/changelog.md +8 -0
- data/{public/img → img}/explain_shell1.png +0 -0
- data/{public/img → img}/explain_shell2.png +0 -0
- data/lib/shell_explain/version.rb +1 -1
- metadata +5 -7
- data/.DS_Store +0 -0
- data/public/.DS_Store +0 -0
- data/public/img/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8e8d3c9ae3d9607d72f9b2e64baa52a903d9e3c
|
4
|
+
data.tar.gz: 51be4927f7c36a90da016d1a9fc0ea053192ffa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4ceaf31c50b143994cf4b86424c23fe6b9e8b964353131b24ba992db6eb7a8c68ab2b37226cae58e3ed37f6c3d3d2c9a24e3a982f527c440db692cb6912002
|
7
|
+
data.tar.gz: 01e23d45ba538d953ac22fdfc6d62f478fc6a7df49008919f0243cef8816db77584db058f10d04c6803a86c67031427052d50db384e4c0ec79e6291e9028cb6e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -29,11 +29,18 @@ $ explain "mysql -u root -p -h 192.168.1.2"
|
|
29
29
|
$ explain "iptables -A INPUT -i eth0 -s ip-to-block -j DROP"
|
30
30
|
$ explain "git log --graph --abbrev-commit --pretty=oneline origin..mybranch"
|
31
31
|
```
|
32
|
+
**change explain text color:**
|
33
|
+
color depend on 'ansi'
|
34
|
+
|
35
|
+
```sh
|
36
|
+
$ explain "true && { echo success; } || { echo failed; }" "green"
|
37
|
+
```
|
38
|
+
|
32
39
|
|
33
40
|
## Screenshots
|
41
|
+
![explain_shell1](https://raw.github.com/ZhangHanDong/shell_explain/master/img/explain_shell1.png)
|
34
42
|
|
35
|
-
![
|
36
|
-
![alt tag](https://github.com/ZhangHanDong/shell_explain/public/img/explain_shell2.png)
|
43
|
+
![explain_shell2](https://raw.github.com/ZhangHanDong/shell_explain/master/img/explain_shell2.png)
|
37
44
|
|
38
45
|
|
39
46
|
## Contributing
|
data/bin/explain
CHANGED
@@ -8,6 +8,7 @@ require 'ansi/progressbar'
|
|
8
8
|
|
9
9
|
# get cmd
|
10
10
|
@cmd = ARGV[0]
|
11
|
+
@explain_color = ARGV[1].nil? ? :yellow : ARGV[1]
|
11
12
|
|
12
13
|
#progress bar
|
13
14
|
pbar = ANSI::Progressbar.new("Test Bar", 100)
|
@@ -39,13 +40,12 @@ puts ("+"*20)+"Explain Shell"+("+"*20)
|
|
39
40
|
|
40
41
|
puts "invalid command".ansi(:red) if @results.empty?
|
41
42
|
@results.each do |re|
|
42
|
-
|
43
|
-
cmd_name = @commands.each_pair do|pair|
|
43
|
+
cmd_name = @commands.each_pair do|pair|
|
44
44
|
puts pair[0].ansi(:red) if pair.include?(re[0])
|
45
|
-
|
45
|
+
end
|
46
46
|
|
47
|
-
|
48
|
-
|
47
|
+
puts re[1].ansi(@explain_color.to_sym)
|
48
|
+
puts ("+"*50).ansi(:green)
|
49
49
|
end
|
50
50
|
|
51
51
|
|
data/changelog.md
ADDED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shell_explain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- blackanger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi
|
@@ -74,19 +74,17 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .DS_Store
|
78
77
|
- .gitignore
|
79
78
|
- Gemfile
|
80
79
|
- LICENSE.txt
|
81
80
|
- README.md
|
82
81
|
- Rakefile
|
83
82
|
- bin/explain
|
83
|
+
- changelog.md
|
84
|
+
- img/explain_shell1.png
|
85
|
+
- img/explain_shell2.png
|
84
86
|
- lib/shell_explain.rb
|
85
87
|
- lib/shell_explain/version.rb
|
86
|
-
- public/.DS_Store
|
87
|
-
- public/img/.DS_Store
|
88
|
-
- public/img/explain_shell1.png
|
89
|
-
- public/img/explain_shell2.png
|
90
88
|
- shell_explain.gemspec
|
91
89
|
homepage: ''
|
92
90
|
licenses:
|
data/.DS_Store
DELETED
Binary file
|
data/public/.DS_Store
DELETED
Binary file
|
data/public/img/.DS_Store
DELETED
Binary file
|