From 203a7732f5fafb5f9b7e8564bd3bd4587e168134 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 7 Apr 2014 21:25:44 +0100 Subject: Add support for querying client environement variables At connection, a remote client sends all its environement to the server, which then provides access to client env through kak_client_env_VAR_NAME variables in the shell. --- src/client.hh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/client.hh') diff --git a/src/client.hh b/src/client.hh index ac191542..56b8504b 100644 --- a/src/client.hh +++ b/src/client.hh @@ -5,6 +5,7 @@ #include "utils.hh" #include "display_buffer.hh" #include "input_handler.hh" +#include "env_vars.hh" namespace Kakoune { @@ -17,7 +18,9 @@ class Client : public SafeCountable public: Client(std::unique_ptr&& ui, std::unique_ptr&& window, - SelectionList selections, String name); + SelectionList selections, + EnvVarMap env_vars, + String name); ~Client(); // handle all the keys currently available in the user interface @@ -37,12 +40,16 @@ public: void change_buffer(Buffer& buffer); + const String& get_env_var(const String& name) const; + private: DisplayLine generate_mode_line() const; std::unique_ptr m_ui; std::unique_ptr m_window; + EnvVarMap m_env_vars; + InputHandler m_input_handler; DisplayLine m_status_line; -- cgit v1.2.3