diff options
Diffstat (limited to 'ranger.rb')
-rwxr-xr-x | ranger.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ranger.rb b/ranger.rb index 6f3f3aa2..3d930d4e 100755 --- a/ranger.rb +++ b/ranger.rb @@ -39,11 +39,6 @@ load 'data/apps.rb' load 'data/colorscheme/default.rb' load 'data/screensaver/clock.rb' -unless ARGV.empty? or File.directory?(pwd) - exec(Fm.getfilehandler_frompath(pwd)) -end - -include CLI include Debug Debug.setup( :name => 'nyuron', @@ -52,6 +47,15 @@ Debug.setup( :name => 'nyuron', ERROR_STREAM = File.open('/tmp/errorlog', 'a') +if pwd and !ARGV.empty? and !File.directory?(pwd) + file = Directory::Entry.new(pwd) + file.get_data + Action.run(RunContext.new(file, 0, 'c')) + exit +end + +include CLI + Signal.trap(Scheduler::UPDATE_SIGNAL) do Fm.refresh end |