about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2016-03-21 22:45:12 +0100
committerCiro Santilli <ciro.santilli@gmail.com>2016-03-21 22:45:12 +0100
commit000504ab8fdc8a61322bd2a4e2523d366ed19802 (patch)
tree81ff4d7ee3b63f7312d43b68513d46996ff260c8
parent09c30cdf4b9050d548e12b5108581680357ac5f1 (diff)
downloadranger-000504ab8fdc8a61322bd2a4e2523d366ed19802.tar.gz
Add %confdir macro
-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: