diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-25 18:54:49 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-25 18:54:49 -0800 |
commit | 38e40862fe338d75b05316f4caf66cf36f4faa6b (patch) | |
tree | 18814000157d066ab819e509311a9ba7acc582b9 /env.cpp | |
parent | 5ea78f55f278887b428be5e1397164a85bd93275 (diff) |
More work towards autosuggesting completions
Diffstat (limited to 'env.cpp')
-rw-r--r-- | env.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -97,7 +97,7 @@ struct var_entry_t /** Struct representing one level in the function variable stack */ -typedef struct env_node +struct env_node_t { /** Variable table @@ -118,12 +118,11 @@ typedef struct env_node /** Pointer to next level */ - struct env_node *next; + struct env_node_t *next; - env_node() : new_scope(0), exportv(0), next(NULL) { } -} - env_node_t; + env_node_t() : new_scope(0), exportv(0), next(NULL) { } +}; class variable_entry_t { bool exportv; /**< Whether the variable should be exported */ @@ -337,7 +336,7 @@ static void handle_locale() dcgettext( "fish", "Changing language to English", LC_MESSAGES ); - if( is_interactive ) + if( get_is_interactive() ) { debug( 0, _(L"Changing language to English") ); } @@ -1479,6 +1478,8 @@ static void add_key_to_string_set(const std::map<wcstring, var_entry_t*> &envs, wcstring_list_t env_get_names( int flags ) { + scoped_lock lock(env_lock); + wcstring_list_t result; std::set<wcstring> names; int show_local = flags & ENV_LOCAL; @@ -1489,9 +1490,9 @@ wcstring_list_t env_get_names( int flags ) get_names_show_exported = - flags & ENV_EXPORT|| (!(flags & ENV_UNEXPORT)); + (flags & ENV_EXPORT) || !(flags & ENV_UNEXPORT); get_names_show_unexported = - flags & ENV_UNEXPORT|| (!(flags & ENV_EXPORT)); + (flags & ENV_UNEXPORT) || !(flags & ENV_EXPORT); if( !show_local && !show_global && !show_universal ) { |