Ranger: Ranger won't open images in Preview on Mac.

Created on 2 Apr 2018  路  3Comments  路  Source: ranger/ranger

Runtime Environment

  • Operating system and version: macOS High Sierra (10.13.3)
  • Terminal emulator and version: iTerm2 (build 3.1.5)
  • Python version: 2.7.10
  • Ranger version/commit: 1.9.1
  • Locale: None.None

Current Behavior

When I try to open an image by pressing enter/>/l (have tried PNG & JPG) it just makes the command line at the bottom say :open_with.

Expected Behavior

Open the image in preview.

Context


I tried typing "preview" (the default image viewer on mac) after the ":open_with" and all the other ways of typing it I could think of, like the path and "Preview.app" but nothing worked. All of the videos that I found to try to help me fix this issue was just making image previews show up, but I just want to open the image.

Steps to reproduce

  1. Press "Enter" on an image file.

Most helpful comment

Thanks! It worked. Last time I tried editing rifle.conf ranger just wouldn't launch. I guess the sources I used for that attempt were outdated or just didn't type it correctly.

All 3 comments

Add the following to your rifle.conf in ~/.config/ranger/rifle.conf, if you don't have one run ranger --copy-config=rifle first.
Somewhere in the "Image Viewing" section for example, the higher up the more precedence it takes.
mime ^image, flag f = open -- "$@"
Not really familiar with the syntax for OSX's open command but I think that should work.

Thanks! It worked. Last time I tried editing rifle.conf ranger just wouldn't launch. I guess the sources I used for that attempt were outdated or just didn't type it correctly.

mime ^image, flag f = open -- "$@"

anger

Was this page helpful?
0 / 5 - 0 ratings