diff options
author | hut <hut@lavabit.com> | 2009-07-20 04:35:51 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-20 04:35:51 +0200 |
commit | 8dee61df3a8c767dd4960711e1b785b293bf5575 (patch) | |
tree | 58d39b14f7844e5dc5b2afaa74d9e77d9b0a7075 | |
parent | 3b54a8a1af4c2c19f64399110cbb43fd3f6c4e9b (diff) | |
download | ranger-8dee61df3a8c767dd4960711e1b785b293bf5575.tar.gz |
you can call ranger with files in the argument again
-rwxr-xr-x | ranger.rb | 6 |
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 |