diff options
author | filip <filipbachul@gmail.com> | 2021-07-14 00:06:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 17:06:08 -0400 |
commit | 88ed0ed45a2f4dfe57085324f93fe0f1f65c7184 (patch) | |
tree | b92e6ee682d6b6613e1ca2d463a49f046d34534d /src/config.rs | |
parent | c9249dbe0b8e508b0067512e1accdf80e4d014ec (diff) |
feat(env_var): allow multiple instances (#2797)
Allows displaying multiple instances of the env_var module.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 1f002efcb..795f9f38a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -342,6 +342,10 @@ impl StarshipConfig { pub fn get_custom_modules(&self) -> Option<&toml::value::Table> { self.get_config(&["custom"])?.as_table() } + /// Get the table of all the registered env_var modules, if any + pub fn get_env_var_modules(&self) -> Option<&toml::value::Table> { + self.get_config(&["env_var"])?.as_table() + } pub fn get_root_config(&self) -> StarshipRootConfig { if let Some(root_config) = &self.config { |