mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 22:58:46 +00:00
8ec1467dda
This implements the primary environment stack, and other environments such as the null and snapshot environments, in Rust. These are used to implement the push and pop from block scoped commands such as `for` and `begin`, and also function calls.
22 lines
652 B
C++
22 lines
652 B
C++
// Prototypes for functions that react to environment variable changes
|
|
#ifndef FISH_ENV_DISPATCH_H
|
|
#define FISH_ENV_DISPATCH_H
|
|
|
|
#include "config.h" // IWYU pragma: keep
|
|
|
|
#include "common.h"
|
|
|
|
class environment_t;
|
|
class env_stack_t;
|
|
|
|
/// Initialize variable dispatch.
|
|
void env_dispatch_init(const environment_t &vars);
|
|
|
|
/// React to changes in variables like LANG which require running some code.
|
|
void env_dispatch_var_change(const wcstring &key, env_stack_t &vars);
|
|
|
|
/// FFI wrapper which always uses the principal stack.
|
|
/// TODO: pass in the variables directly.
|
|
void env_dispatch_var_change_ffi(const wcstring &key /*, env_stack_t &vars */);
|
|
|
|
#endif
|