arsh 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/arsh +4 -4
- data/libs/rvm.rb +14 -0
- data/libs/version.rb +1 -1
- metadata +31 -54
data/bin/arsh
CHANGED
@@ -29,7 +29,7 @@ Readline.completion_proc = lambda do |search|
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
# Complete builtin methods
|
32
|
-
ArshCommands.singleton_methods.each { |method| files << method if method =~ /^#{search}/ }
|
32
|
+
ArshCommands.singleton_methods.each { |method| files << method.to_s if method.to_s =~ /^#{search}/ }
|
33
33
|
files.uniq
|
34
34
|
files = files.select { |f| f =~ %r[^#{search}] }
|
35
35
|
end
|
@@ -118,9 +118,9 @@ end
|
|
118
118
|
# Load rbshrc's
|
119
119
|
["/etc/arshrc","#{ENV['HOME']}/.arshrc"].each do |arshrc|
|
120
120
|
File.open(arshrc,"r").readlines.each do |line|
|
121
|
-
|
122
|
-
|
123
|
-
ArshCommands.
|
121
|
+
method = line.split[0]
|
122
|
+
unless ArshCommands.singleton_methods.grep(/^#{method}$/).empty?
|
123
|
+
ArshCommands.send(method, line.chomp.split(' ',2)[1..-1])
|
124
124
|
else
|
125
125
|
ArshCommands.ruby_eval(line,false) if line != ""
|
126
126
|
end
|
data/libs/rvm.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module ArshCommands
|
2
|
+
def self.rvm(command)
|
3
|
+
command = command.join(' ')
|
4
|
+
output = %x{bash -c "source #{ENV['HOME']}/.rvm/scripts/rvm; rvm #{command}; env | grep -i rvm"}
|
5
|
+
output.split("\n").select { |l| l[/=/] }.each do |n|
|
6
|
+
var, value = n.split(/=/,2)
|
7
|
+
ENV[var.upcase] = value
|
8
|
+
end
|
9
|
+
case command
|
10
|
+
when /^use /
|
11
|
+
puts "\e[32mUsing #{ENV['GEM_HOME']}\e[0m"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/libs/version.rb
CHANGED
metadata
CHANGED
@@ -1,51 +1,40 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: arsh
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.8
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 7
|
10
|
-
version: 1.0.7
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- James Paterni
|
14
9
|
- Brian Faga
|
15
10
|
- Eugene Howe
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2012-01-12 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
24
17
|
name: rb-readline
|
25
|
-
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: &6110640 !ruby/object:Gem::Requirement
|
27
19
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
|
32
|
-
segments:
|
33
|
-
- 0
|
34
|
-
version: "0"
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
35
24
|
type: :runtime
|
36
|
-
|
37
|
-
|
38
|
-
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *6110640
|
27
|
+
description: Provides a shell that can run pure Ruby code as well as ordinary linux
|
28
|
+
commands.
|
29
|
+
email:
|
39
30
|
- james@ruby-code.com
|
40
31
|
- eugene@xtreme-computers.net
|
41
|
-
executables:
|
32
|
+
executables:
|
42
33
|
- arsh
|
43
34
|
- arsh_configure_for_rvm
|
44
35
|
extensions: []
|
45
|
-
|
46
36
|
extra_rdoc_files: []
|
47
|
-
|
48
|
-
files:
|
37
|
+
files:
|
49
38
|
- bin/arsh_configure_for_rvm
|
50
39
|
- bin/arsh
|
51
40
|
- plugins/ls.rb
|
@@ -56,41 +45,29 @@ files:
|
|
56
45
|
- libs/cd.rb
|
57
46
|
- libs/alias.rb
|
58
47
|
- libs/version.rb
|
59
|
-
|
48
|
+
- libs/rvm.rb
|
60
49
|
homepage: http://github.com/jamez01/arsh
|
61
50
|
licenses: []
|
62
|
-
|
63
51
|
post_install_message:
|
64
52
|
rdoc_options: []
|
65
|
-
|
66
|
-
require_paths:
|
53
|
+
require_paths:
|
67
54
|
- lib
|
68
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
56
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
- 0
|
76
|
-
version: "0"
|
77
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
62
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
hash: 2387630629434237851
|
83
|
-
segments:
|
84
|
-
- 1
|
85
|
-
- 3
|
86
|
-
- 6
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
87
66
|
version: 1.3.6
|
88
67
|
requirements: []
|
89
|
-
|
90
68
|
rubyforge_project:
|
91
|
-
rubygems_version: 1.
|
69
|
+
rubygems_version: 1.8.10
|
92
70
|
signing_key:
|
93
71
|
specification_version: 3
|
94
72
|
summary: Linux shell implemented in pure Ruby
|
95
73
|
test_files: []
|
96
|
-
|