diff options
author | 2006-08-28 19:58:40 +1000 | |
---|---|---|
committer | 2006-08-28 19:58:40 +1000 | |
commit | f771fce892394ba877141416d07d930bc7456b2d (patch) | |
tree | bfd755fd5e67ae3b962389558dc7be863f7a0ef0 /env.c | |
parent | 6522000bf0de69a8a370ae4d9d28a0b305d641ae (diff) |
Add a $version variable. Suggested by Martin Bähr
darcs-hash:20060828095840-ac50b-db561647eee1d06785448a4bfc6826eef5aec2b7.gz
Diffstat (limited to 'env.c')
-rw-r--r-- | env.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -457,6 +457,8 @@ void env_init() char **p; struct passwd *pw; wchar_t *uname; + wchar_t *version; + sb_init( &dyn_var ); b_init( &export_buffer ); @@ -468,6 +470,7 @@ void env_init() hash_put( &env_read_only, L"status", L"" ); hash_put( &env_read_only, L"history", L"" ); + hash_put( &env_read_only, L"version", L"" ); hash_put( &env_read_only, L"_", L"" ); hash_put( &env_read_only, L"LINES", L"" ); hash_put( &env_read_only, L"COLUMNS", L"" ); @@ -555,6 +558,13 @@ void env_init() env_set( L"USER", uname, ENV_GLOBAL | ENV_EXPORT ); free( uname ); } + + /* + Set up the version variable + */ + version = str2wcs( PACKAGE_VERSION ); + env_set( L"version", version, ENV_GLOBAL ); + free( version ); env_universal_init( env_get( L"FISHD_SOCKET_DIR"), env_get( L"USER" ), |