diff options
-rw-r--r-- | ranger/gui/widgets/console.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index f06b911b..dbdc8b53 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -452,24 +452,24 @@ class OpenConsole(ConsoleWithTab): if file.shell_escaped_basename.startswith(start_of_word)) def _substitute_metachars(self, command): - dct = {} + macros = {} if self.fm.env.cf: - dct['f'] = shell_quote(self.fm.env.cf.basename) + macros['f'] = shell_quote(self.fm.env.cf.basename) else: - dct['f'] = '' + macros['f'] = '' - dct['s'] = ' '.join(shell_quote(fl.basename) \ + macros['s'] = ' '.join(shell_quote(fl.basename) \ for fl in self.fm.env.get_selection()) - dct['c'] = ' '.join(shell_quote(fl.path) + macros['c'] = ' '.join(shell_quote(fl.path) for fl in self.fm.env.copy) - dct['t'] = ' '.join(shell_quote(fl.basename) + macros['t'] = ' '.join(shell_quote(fl.basename) for fl in self.fm.env.cwd.files if fl.realpath in self.fm.tags) - return _CustomTemplate(command).safe_substitute(dct) + return _CustomTemplate(command).safe_substitute(macros) def _parse(self): if '!' in self.line: |