explain_shell 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/explain +3 -16
- data/bin/explain.sh +17 -0
- data/explain_shell.gemspec +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bb4695d1f8b3ee10da4c0607af886f06c6b9057
|
4
|
+
data.tar.gz: 3a35afbaf9eeba98e2d9e8c00eeb4866df70ca72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca7aed422a6749bb198a97372fc845dcab7c1c85fbca9d8d5870c6b1ca34ad7f90ee5bb0bea4347f1d333efe088a6914d20fe519b11150d098f8f233bc830e93
|
7
|
+
data.tar.gz: 8cbe97fa356a9eb4eb9c241f2946c373611bef518bb32a1a2354e7c9d190eea4bd7e43290f1bea6a3dbaeb50c90b9b638978fe260315e5dae5a48e3ed87f47d4
|
data/bin/explain
CHANGED
@@ -1,17 +1,4 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
# => http://explainshel.com/explain/tar?args=
|
6
|
-
URL="http://explainshell.com/explain/$1?args="
|
7
|
-
|
8
|
-
# removes $1 (tar) from arguments ($@)
|
9
|
-
shift;
|
10
|
-
|
11
|
-
# iterates over remaining args and adds builds the rest of the url
|
12
|
-
for i in "$@"; do
|
13
|
-
URL=$URL"$i""+"
|
14
|
-
done
|
15
|
-
|
16
|
-
# opens url in browser
|
17
|
-
open $URL
|
3
|
+
explain_script = File.expand_path('../explain.sh', __FILE__)
|
4
|
+
exec "#{explain_script} #{ARGV}"
|
data/bin/explain.sh
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env sh
|
2
|
+
|
3
|
+
# base url with first command already injected
|
4
|
+
# $ explain tar
|
5
|
+
# => http://explainshel.com/explain/tar?args=
|
6
|
+
url="http://explainshell.com/explain/$1?args="
|
7
|
+
|
8
|
+
# removes $1 (tar) from arguments ($@)
|
9
|
+
shift;
|
10
|
+
|
11
|
+
# iterates over remaining args and adds builds the rest of the url
|
12
|
+
for i in "$@"; do
|
13
|
+
url=$url"$i""+"
|
14
|
+
done
|
15
|
+
|
16
|
+
# opens url in browser
|
17
|
+
open $url
|
data/explain_shell.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "explain_shell"
|
5
|
-
gem.version = "1.0.
|
5
|
+
gem.version = "1.0.1"
|
6
6
|
gem.authors = ["Richard Schneeman"]
|
7
7
|
gem.email = ["richard.schneeman+rubygems@gmail.com"]
|
8
8
|
gem.description = %q{ Bash interface to http://explainshell.com/ }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: explain_shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
@@ -15,11 +15,13 @@ email:
|
|
15
15
|
- richard.schneeman+rubygems@gmail.com
|
16
16
|
executables:
|
17
17
|
- explain
|
18
|
+
- explain.sh
|
18
19
|
extensions: []
|
19
20
|
extra_rdoc_files: []
|
20
21
|
files:
|
21
22
|
- .gitignore
|
22
23
|
- bin/explain
|
24
|
+
- bin/explain.sh
|
23
25
|
- explain_shell.gemspec
|
24
26
|
- readme.md
|
25
27
|
homepage: https://github.com/schneems/explain_shell
|