1
0
mirror of https://github.com/captn3m0/dotfiles.git synced 2024-09-27 19:22:50 +00:00
dotfiles/files/ranger/.config/ranger/commands.py
Abhay Rana 053d3350d1 Initial ranger config
- Custom colors
- some gitignore
- fasd integration
2015-07-09 03:55:50 +05:30

13 lines
341 B
Python

import subprocess
from ranger.api.commands import *
class fasd(Command):
"""
:fasd
Jump to directory using fasd
"""
def execute(self):
arg = self.rest(1)
if arg:
directory = subprocess.check_output(["fasd", "-d"]+arg.split(), universal_newlines=True).strip()
self.fm.cd(directory)