Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
568 B

import os
import sys
from ranger.core.loader import CommandLoader
from ranger.api.commands import Command
class chrome_choose(Command):
def execute(self):
""" Extract copied files to current directory """
filename = self.arg(1)
cwd = self.fm.thisdir
if filename == '.':
with open('/tmp/ranger-chrome-choosed', 'w') as f:
f.write(cwd.path + '/')
sys.exit(0)
with open('/tmp/ranger-chrome-choosed', 'w') as f:
f.write(os.path.join(cwd.path, filename))
sys.exit(0)