diff options
author | hut <hut@lavabit.com> | 2010-04-28 14:49:26 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-28 14:49:26 +0200 |
commit | ccb56d06a555efee9490f60029e50d9c060ec176 (patch) | |
tree | db176f92d57600bcd942f0dca669c1be0a8888dc | |
parent | 03ef4f4c9a23026f6ce7b0a30117b6a9cacba4de (diff) | |
download | ranger-ccb56d06a555efee9490f60029e50d9c060ec176.tar.gz |
widgets.console: added macro %d
-rw-r--r-- | ranger/gui/widgets/console.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index dbdc8b53..fa9e438e 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -469,6 +469,11 @@ class OpenConsole(ConsoleWithTab): for fl in self.fm.env.cwd.files if fl.realpath in self.fm.tags) + if self.fm.env.cwd: + macros['d'] = shell_quote(self.fm.env.cwd.path) + else: + macros['d'] = '.' + return _CustomTemplate(command).safe_substitute(macros) def _parse(self): |