From 9f81093411ebb2b4eee2b20d8f0a5db68f0c653a Mon Sep 17 00:00:00 2001 From: Eike Plack Date: Tue, 23 Dec 2014 02:49:53 +0100 Subject: Expose buffer list to shell over $kak_buflist --- src/main.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/main.cc b/src/main.cc index 8b5d0114..885d7333 100644 --- a/src/main.cc +++ b/src/main.cc @@ -56,6 +56,17 @@ void register_env_vars() "buffile", [](StringView name, const Context& context) -> String { return context.buffer().name(); } + }, { + "buflist", + [](StringView name, const Context& context) + { + String res; + for (auto& buf : BufferManager::instance()) + { + res += buf->display_name() + ":"; + } + res.pop_back(); + return res; } }, { "timestamp", [](StringView name, const Context& context) -- cgit v1.2.3