diff --git a/home/programs/ranger/config/commands.py b/home/programs/ranger/config/commands.py index 5defa677..969be61f 100644 --- a/home/programs/ranger/config/commands.py +++ b/home/programs/ranger/config/commands.py @@ -94,7 +94,9 @@ from collections import deque import os import re +from io import open +from ranger import PY3 from ranger.api.commands import Command @@ -141,6 +143,12 @@ def execute(self): if os.path.isfile(destination): self.fm.select_file(destination) return + elif self.arg(1) == '-e': + self.shift() + destination = os.path.realpath(os.path.expandvars(self.rest(1))) + if os.path.isfile(destination): + self.fm.select_file(destination) + return else: destination = self.rest(1) @@ -337,7 +345,7 @@ class open_with(Command): def execute(self): app, flags, mode = self._get_app_flags_mode(self.rest(1)) self.fm.execute_file( - files=[f for f in self.fm.thistab.get_selection()], + files=self.fm.thistab.get_selection(), app=app, flags=flags, mode=mode) @@ -480,36 +488,106 @@ def default_value_completer(): return None -class setlocal(set_): - """:setlocal path=