diff options
author | tdro <tdro@users.noreply.github.com> | 2019-04-28 21:53:15 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2019-04-28 21:53:15 -0400 |
commit | 8d49fa51dbf25627aa86f111751734045e577969 (patch) | |
tree | 1873472a0ef2a3bac0e6727743b7a5ae49a1072a /.config/ranger | |
parent | a8328e9409f707551efc7190cd7e5dbae955ab44 (diff) | |
download | dotfiles-8d49fa51dbf25627aa86f111751734045e577969.tar.gz dotfiles-8d49fa51dbf25627aa86f111751734045e577969.tar.bz2 dotfiles-8d49fa51dbf25627aa86f111751734045e577969.zip |
.config/ranger/commands: fzf_select sort by time and use xdg-open
Diffstat (limited to '.config/ranger')
-rw-r--r-- | .config/ranger/commands.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.config/ranger/commands.py b/.config/ranger/commands.py index 8b130ff..8afe749 100644 --- a/.config/ranger/commands.py +++ b/.config/ranger/commands.py @@ -23,7 +23,7 @@ class fzf_select(Command): def execute(self): import subprocess import os.path - fzf = self.fm.execute_command("ls -A1 --color=never | fzf +m", universal_newlines=True, stdout=subprocess.PIPE) + fzf = self.fm.execute_command("ls -t -A1 --color=never | fzf +m", universal_newlines=True, stdout=subprocess.PIPE) stdout, stderr = fzf.communicate() if fzf.returncode == 0: fzf_file = os.path.abspath(stdout.rstrip('\n')) @@ -31,3 +31,4 @@ class fzf_select(Command): self.fm.cd(fzf_file) else: self.fm.select_file(fzf_file) + self.fm.run('xdg-open ' + fzf_file) |