From e4c951fe9385348827791d58ee23b13cf9d0f5fe Mon Sep 17 00:00:00 2001 From: Sam Hedin Date: Sat, 6 Jun 2020 13:26:42 +0200 Subject: [PATCH] Rename config function --- crates/nu-cli/src/data/config/conf.rs | 6 +++--- crates/nu-cli/src/data/config/nuconfig.rs | 6 +++--- crates/nu-cli/src/env/environment.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/nu-cli/src/data/config/conf.rs b/crates/nu-cli/src/data/config/conf.rs index efd44d396c..1f53f0c7a2 100644 --- a/crates/nu-cli/src/data/config/conf.rs +++ b/crates/nu-cli/src/data/config/conf.rs @@ -4,7 +4,7 @@ use std::fmt::Debug; pub trait Conf: Debug + Send { fn env(&self) -> Option; fn path(&self) -> Option; - fn direnv_whitelist(&self) -> Option; + fn nu_env_dirs(&self) -> Option; fn reload(&self); } @@ -13,8 +13,8 @@ impl Conf for Box { (**self).env() } - fn direnv_whitelist(&self) -> Option { - (**self).direnv_whitelist() + fn nu_env_dirs(&self) -> Option { + (**self).nu_env_dirs() } fn path(&self) -> Option { diff --git a/crates/nu-cli/src/data/config/nuconfig.rs b/crates/nu-cli/src/data/config/nuconfig.rs index 9630e18355..54001026a2 100644 --- a/crates/nu-cli/src/data/config/nuconfig.rs +++ b/crates/nu-cli/src/data/config/nuconfig.rs @@ -20,8 +20,8 @@ impl Conf for NuConfig { self.path() } - fn direnv_whitelist(&self) -> Option { - self.direnv_whitelist() + fn nu_env_dirs(&self) -> Option { + self.nu_env_dirs() } fn reload(&self) { @@ -56,7 +56,7 @@ impl NuConfig { None } - pub fn direnv_whitelist(&self) -> Option { + pub fn nu_env_dirs(&self) -> Option { let vars = self.vars.lock(); if let Some(dirs) = vars.get("nu_env_dirs") { return Some(dirs.clone()); diff --git a/crates/nu-cli/src/env/environment.rs b/crates/nu-cli/src/env/environment.rs index a32735cdf4..53f863f2bb 100644 --- a/crates/nu-cli/src/env/environment.rs +++ b/crates/nu-cli/src/env/environment.rs @@ -54,7 +54,7 @@ impl Environment { Environment { environment_vars: env, path_vars: path, - direnv: DirectorySpecificEnvironment::new(configuration.direnv_whitelist()), + direnv: DirectorySpecificEnvironment::new(configuration.nu_env_dirs()), } }