PATH for completions for each os (#784)

This commit is contained in:
Darren Schroeder 2022-01-20 12:46:52 -06:00 committed by GitHub
parent 45b3592739
commit 65ef7b630b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,16 +23,7 @@ impl NuCompleter {
let mut executables = vec![];
let paths;
#[cfg(windows)]
{
paths = self.engine_state.env_vars.get("Path");
}
#[cfg(not(windows))]
{
paths = self.engine_state.env_vars.get("PATH");
}
paths = self.engine_state.env_vars.get("PATH");
if let Some(paths) = paths {
if let Ok(paths) = paths.as_list() {