From a10fa3a20b634c033476be15769bff1a37632f3f Mon Sep 17 00:00:00 2001 From: "David Adam (zanchey)" Date: Fri, 2 Nov 2012 18:36:06 +0800 Subject: [PATCH] add $FISH_VERSION as unexported global variable to complement version --- env.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/env.cpp b/env.cpp index 56c4d79ff..50cfbc6c4 100644 --- a/env.cpp +++ b/env.cpp @@ -557,6 +557,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */) L"COLUMNS", L"PWD", L"SHLVL", + L"FISH_VERSION", }; for (size_t i=0; i < sizeof ro_keys / sizeof *ro_keys; i++) { env_read_only.insert(ro_keys[i]); @@ -653,10 +654,11 @@ void env_init(const struct config_paths_t *paths /* or NULL */) } /* - Set up the version variable + Set up the version variables */ version = str2wcs( PACKAGE_VERSION ); env_set( L"version", version, ENV_GLOBAL ); + env_set( L"FISH_VERSION", version, ENV_GLOBAL ); free( version ); const env_var_t fishd_dir_wstr = env_get_string( L"FISHD_SOCKET_DIR");