[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ranger-users] Preview command
From: |
Michael Longval |
Subject: |
[Ranger-users] Preview command |
Date: |
Mon, 20 Apr 2015 12:40:50 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi,
I added this to my rc.conf and commands.py files
It only works on MacOSX, but I find it usefull.
This part goes into rc.conf:
map P preview %f
And this part goes into command.py:
class preview(Command):
""":preview <filename>
Opens the specified file in MacOSX Preview.app
"""
def execute(self):
theFile = self.fm.thisfile.path
theCommand = "open -f -a /Applications/Preview.app/ " + "'" + theFile +
"' &" # this only works on MacOSX
call(theCommand, shell=True)
Mike
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ranger-users] Preview command,
Michael Longval <=