mirror of
https://github.com/captn3m0/dotfiles.git
synced 2024-09-27 19:22:50 +00:00
13 lines
341 B
Python
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)
|