arsh 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/arsh +6 -9
- data/libs/alias.rb +2 -2
- data/libs/version.rb +1 -1
- metadata +3 -3
data/bin/arsh
CHANGED
@@ -5,13 +5,6 @@ require 'rb-readline'
|
|
5
5
|
|
6
6
|
Dir.glob("#{ARSH_INSTALL_PATH}/libs/*.rb").each { |mod| load(mod) }
|
7
7
|
trap('QUIT',"IGNORE")
|
8
|
-
#trap('INT') do
|
9
|
-
# begin
|
10
|
-
# break
|
11
|
-
# rescue
|
12
|
-
# print "^C"
|
13
|
-
# end
|
14
|
-
#end
|
15
8
|
## Set up some default variables
|
16
9
|
$ps1="(arsh)<% ENV['USER'] %>@<% Dir.pwd %>$ "
|
17
10
|
$ps2=">"
|
@@ -125,7 +118,12 @@ end
|
|
125
118
|
# Load rbshrc's
|
126
119
|
["/etc/arshrc","#{ENV['HOME']}/.arshrc"].each do |arshrc|
|
127
120
|
File.open(arshrc,"r").readlines.each do |line|
|
128
|
-
|
121
|
+
case line
|
122
|
+
when /^alias/
|
123
|
+
ArshCommands.alias(line.chomp.split(' ',2)[1..-1])
|
124
|
+
else
|
125
|
+
ArshCommands.ruby_eval(line,false) if line != ""
|
126
|
+
end
|
129
127
|
end if File.exist?(arshrc)
|
130
128
|
end
|
131
129
|
|
@@ -142,7 +140,6 @@ while true
|
|
142
140
|
prompt = ArshCommands.rubyeval_indent == 0 ? $ps1 : "#{$ps2 * ArshCommands.rubyeval_indent} "
|
143
141
|
input = Readline::readline(ArshCommands.replacestring(prompt)).to_s.strip
|
144
142
|
rescue Exception => e
|
145
|
-
puts e
|
146
143
|
puts ""
|
147
144
|
input = ""
|
148
145
|
end
|
data/libs/alias.rb
CHANGED
data/libs/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arsh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1888582917197345538
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 7
|
10
|
+
version: 1.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Paterni
|