about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/ranger.pod2
-rw-r--r--ranger/core/actions.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 91ba904a..91629a86 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -228,6 +228,8 @@ The macro %rangerdir expands to the directory of ranger's python library, you
 can use it for something like this command:
   alias show_commands shell less %rangerdir/config/commands.py
 
+%confdir expands to the directory given by B<--confdir>.
+
 The macro %space expands to a space character. You can use it to add spaces to
 the end of a command when needed, while preventing editors to strip spaces off
 the end of the line automatically.
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 89924dc0..a22b9cd8 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -245,6 +245,7 @@ class Actions(FileManagerAware, SettingsAware):
         macros = {}
 
         macros['rangerdir'] = ranger.RANGERDIR
+        macros['confdir'] = self.fm.confpath()
         macros['space'] = ' '
 
         if self.fm.thisfile: