2019-03-26 03:18:00 +00:00
|
|
|
// 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"
|
|
|
|
|
2019-04-01 02:51:08 +00:00
|
|
|
class environment_t;
|
2022-03-28 01:59:34 +00:00
|
|
|
class env_stack_t;
|
|
|
|
|
|
|
|
/// Initialize variable dispatch.
|
2019-04-01 02:51:08 +00:00
|
|
|
void env_dispatch_init(const environment_t &vars);
|
2019-03-26 03:18:00 +00:00
|
|
|
|
2022-03-28 01:59:34 +00:00
|
|
|
/// React to changes in variables like LANG which require running some code.
|
2019-04-08 19:37:38 +00:00
|
|
|
void env_dispatch_var_change(const wcstring &key, env_stack_t &vars);
|
2019-03-26 03:18:00 +00:00
|
|
|
|
2023-04-30 02:58:51 +00:00
|
|
|
/// 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 */);
|
|
|
|
|
2019-03-26 03:18:00 +00:00
|
|
|
#endif
|