about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/console.py5
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):