arsh 1.1.3 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/arsh +3 -1
  2. data/libs/string.rb +18 -0
  3. data/libs/version.rb +1 -1
  4. metadata +5 -4
data/bin/arsh CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['TERM'] = 'ansi'
3
2
  ARSH_INSTALL_PATH=File.expand_path("../../",__FILE__)
4
3
  require 'rubygems'
5
4
  require 'rb-readline'
@@ -16,6 +15,9 @@ Readline.completion_proc = lambda do |search|
16
15
  # Complete files and directories
17
16
  # Complete programs and files within the path.
18
17
  files = []
18
+ if search =~ /^~/
19
+ search = search.gsub(/^~/,"#{ENV['HOME']}")
20
+ end
19
21
  case search
20
22
  when ""
21
23
  files = ArshCommands.search_current_directory(files,search)
data/libs/string.rb ADDED
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+ class String
3
+ def console_red; colorize(self, "\001\e[1m\e[31m\002"); end
4
+ def console_dark_red; colorize(self, "\001\e[31m\002"); end
5
+ def console_green; colorize(self, "\001\e[1m\e[32m\002"); end
6
+ def console_dark_green; colorize(self, "\001\e[32m\002"); end
7
+ def console_yellow; colorize(self, "\001\e[1m\e[33m\002"); end
8
+ def console_dark_yellow; colorize(self, "\001\e[33m\002"); end
9
+ def console_blue; colorize(self, "\001\e[1m\e[34m\002"); end
10
+ def console_dark_blue; colorize(self, "\001\e[34m\002"); end
11
+ def console_purple; colorize(self, "\001\e[1m\e[35m\002"); end
12
+
13
+ def console_def; colorize(self, "\001\e[1m\002"); end
14
+ def console_bold; colorize(self, "\001\e[1m\002"); end
15
+ def console_blink; colorize(self, "\001\e[5m\002"); end
16
+
17
+ def colorize(text, color_code) "#{color_code}#{text}\001\e[0m\002" end
18
+ end
data/libs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Arsh
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-01-18 00:00:00.000000000 Z
14
+ date: 2012-01-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rb-readline
18
- requirement: &6560120 !ruby/object:Gem::Requirement
18
+ requirement: &7741000 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: '0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *6560120
26
+ version_requirements: *7741000
27
27
  description: Provides a shell that can run pure Ruby code as well as ordinary linux
28
28
  commands.
29
29
  email:
@@ -42,6 +42,7 @@ files:
42
42
  - libs/replacestring.rb
43
43
  - libs/compat.rb
44
44
  - libs/rubyeval.rb
45
+ - libs/string.rb
45
46
  - libs/cd.rb
46
47
  - libs/alias.rb
47
48
  - libs/version.rb