Skip to content

Commit

Permalink
shell executes in the context of a Rush::Box object
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Wiggins committed Mar 10, 2008
1 parent 96f69c9 commit bc55950
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/rush/shell.rb
Expand Up @@ -10,9 +10,6 @@ def initialize
home = Rush::Dir.new(ENV['HOME']) if ENV['HOME']
pwd = Rush::Dir.new(ENV['PWD']) if ENV['PWD']

@pure_binding = Proc.new { }
$last_res = nil

@config = Rush::Config.new

@config.load_history.each do |item|
Expand All @@ -23,9 +20,11 @@ def initialize
Readline.completion_append_character = nil
Readline.completion_proc = completion_proc

eval @config.load_env, @pure_binding
@box = Rush::Box.new
@pure_binding = @box.instance_eval "binding"
$last_res = nil

eval "def processes; Rush::Box.new('localhost').processes; end", @pure_binding
eval @config.load_env, @pure_binding

commands = @config.load_commands
Rush::Dir.class_eval commands
Expand Down

0 comments on commit bc55950

Please sign in to comment.