From 8dee61df3a8c767dd4960711e1b785b293bf5575 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 20 Jul 2009 04:35:51 +0200 Subject: you can call ranger with files in the argument again --- ranger.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ranger.rb b/ranger.rb index bb9e0c3f..2ee36465 100755 --- a/ranger.rb +++ b/ranger.rb @@ -4,6 +4,7 @@ version = '0.2.4' require 'pathname' $: << MYDIR = File.dirname(Pathname(__FILE__).realpath) +ARGV.delete('--cd') if cd = ARGV.include?('--cd') if ARGV.size > 0 case ARGV.first when '-k' @@ -44,7 +45,7 @@ opt = { :debug_level => 0, :debug_file => '/tmp/errorlog', :colorscheme => 'default', - :cd => ARGV.include?('--cd'), + :cd => cd, :evil => false } @@ -66,9 +67,10 @@ Debug.setup( :name => 'ranger', :level => Option.debug_level ) if pwd and !ARGV.empty? and !File.directory?(pwd) + Fm.reload_types file = Directory::Entry.new(pwd) file.get_data - Action.run(RunContext.new(file, 0, 'c')) + Action.run(RunContext.new(file, 0, 'ca')) exit end -- cgit 1.4.1-2-gfad0