From 70bd18e1f264583495fae8c5aa2289f45b1ddf1c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 27 Jun 2012 14:28:43 +0200 Subject: [PATCH] add kak_opt_.* environement variable retriever to access options from shell. --- src/main.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cc b/src/main.cc index bb65806c..e3ead761 100644 --- a/src/main.cc +++ b/src/main.cc @@ -438,6 +438,9 @@ int main(int argc, char* argv[]) shell_manager.register_env_var("selection", [](const String& name, const Context& context) { return context.window().selections_content().back(); }); + shell_manager.register_env_var("opt_.+", + [](const String& name, const Context& context) + { return context.window().option_manager()[name.substr(4)].as_string(); }); register_commands(); register_highlighters(); register_filters();