Revert "Allow NU_LIBS_DIR and friends to be const" (#8501)

Reverts nushell/nushell#8310

In anticipation that we may want to revert this PR. I'm starting the
process because of this issue.

This stopped working
```
let-env NU_LIB_DIRS = [
    ($nu.config-path | path dirname | path join 'scripts')
    'C:\Users\username\source\repos\forks\nu_scripts'
    ($nu.config-path | path dirname)
]
```
You have to do this now instead.
```
const NU_LIB_DIRS = [
    'C:\Users\username\AppData\Roaming\nushell\scripts'
    'C:\Users\username\source\repos\forks\nu_scripts'
    'C:\Users\username\AppData\Roaming\nushell'
]
```

In talking with @kubouch, he was saying that the `let-env` version
should keep working. Hopefully it's a small change.
This commit is contained in:
Darren Schroeder
2023-03-17 09:33:24 -05:00
committed by GitHub
parent eb2e2e6370
commit ef7fbf4bf9
13 changed files with 116 additions and 264 deletions

View File

@ -6,7 +6,7 @@ use nu_protocol::{
PipelineData, Span, Type, Value,
};
use reedline::Suggestion;
use std::{collections::HashMap, sync::Arc};
use std::sync::Arc;
use super::completer::map_value_completions;
@ -66,7 +66,7 @@ impl Completer for CustomCompletion {
],
redirect_stdout: true,
redirect_stderr: true,
parser_info: HashMap::new(),
parser_info: vec![],
},
PipelineData::empty(),
);