about summary refs log tree commit diff stats
path: root/ranger.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 04:35:51 +0200
committerhut <hut@lavabit.com>2009-07-20 04:35:51 +0200
commit8dee61df3a8c767dd4960711e1b785b293bf5575 (patch)
tree58d39b14f7844e5dc5b2afaa74d9e77d9b0a7075 /ranger.rb
parent3b54a8a1af4c2c19f64399110cbb43fd3f6c4e9b (diff)
downloadranger-8dee61df3a8c767dd4960711e1b785b293bf5575.tar.gz
you can call ranger with files in the argument again
Diffstat (limited to 'ranger.rb')
-rwxr-xr-xranger.rb6
1 files 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