summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-02-27 06:43:21 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-02-27 06:44:22 +0000
commitc49e79c9e82f8756f5d002879fe80f0c8f516fc5 (patch)
tree2375bdd125244ab94a26e536f370e928ccdc5e58 /src
parentaceee75ed943b284fd905c7c522566fb314431e4 (diff)
Add buffile env var for getting the buffer filename
Diffstat (limited to 'src')
-rw-r--r--src/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 5dbe9980..4242d265 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -65,6 +65,10 @@ void register_env_vars()
[](const String& name, const Context& context)
{ return context.buffer().display_name(); }
}, {
+ "buffile",
+ [](const String& name, const Context& context)
+ { return context.buffer().name(); }
+ }, {
"timestamp",
[](const String& name, const Context& context)
{ return to_string(context.buffer().timestamp()); }