nushell/crates/nu-command/src/commands
Andrés N. Robalino 7dc1d6a350
Extract .nu-env tests and more granularity (#3078)
The autoenv logic mutates environment variables in the running session as
it operates and decides what to do for trusted directories containing `.nu-env`
files. Few of the ways to interact with it were all in a single test function.

We separate out all the ways that were done in the single test function to document
 it better. This will greatly help once we start refactoring our way out from setting
 environment variables this way to just setting them to `Scope`.

This is part of an on-going effort to keep variables (`PATH` and `ENV`)
in our `Scope` and rely on it for everything related to variables.

We expect to move away from setting (`std::*`) envrironment variables in the current
running process. This is non-trivial since we need to handle cases from vars
coming in from the outside world, prioritize, and also compare to the ones
we have both stored in memory and in configuration files.

Also to send out our in-memory (in `Scope`) variables properly to external
programs once we no longer rely on `std::env` vars from the running process.
2021-02-18 20:24:27 -05:00
..
autoview Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
classified Replace dirs and directories with maintained (#2949) 2021-01-19 14:24:27 -06:00
config nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
date Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
each Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
format Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
hash_ Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
keep Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
math Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
move_ Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
nu Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
parse Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
path Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
random Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
skip Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
split Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
str_ Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
table Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
url_ Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
ansi.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
append.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
args.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
autoenv.rs Extract .nu-env tests and more granularity (#3078) 2021-02-18 20:24:27 -05:00
autoenv_trust.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
autoenv_untrust.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
benchmark.rs Ensure selection of columns are done once per column (#3012) 2021-02-05 19:34:26 -05:00
build_string.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
cal.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
cd.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
char_.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
chart.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
clear.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
clip.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
command.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
compact.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
constants.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
count.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
cp.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
debug.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
def.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
default.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
default_context.rs New termsize command (#3038) 2021-02-10 08:58:22 -06:00
describe.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
do_.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
drop.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
du.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
echo.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
empty.rs Ensure selection of columns are done once per column (#3012) 2021-02-05 19:34:26 -05:00
enter.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
every.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
exec.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
exit.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
first.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
flatten.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_csv.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_delimited_data.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
from_eml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_ics.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_ini.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_json.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_ods.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_ssv.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_toml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_tsv.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_url.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_vcf.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_xlsx.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_xml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
from_yaml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
get.rs Soft rest arguments column path cohersions. (#3016) 2021-02-06 20:05:47 -05:00
group_by.rs Ensure selection of columns are done once per column (#3012) 2021-02-05 19:34:26 -05:00
group_by_date.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
headers.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
help.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
histogram.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
history.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
if_.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
insert.rs Ensure selection of columns are done once per column (#3012) 2021-02-05 19:34:26 -05:00
into_int.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
kill.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
last.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
let_.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
let_env.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
lines.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
ls.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
macros.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
merge.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
mkdir.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
next.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
nth.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
open.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
pivot.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
prepend.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
prev.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
pwd.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
range.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
reduce.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
reject.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
rename.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
reverse.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
rm.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
run_external.rs nu-cli refactor moving commands into their own crate nu-command (#2910) 2021-01-12 17:59:53 +13:00
save.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
select.rs Soft rest arguments column path cohersions. (#3016) 2021-02-06 20:05:47 -05:00
seq.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
seq_dates.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
shells.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
shuffle.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
size.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
sleep.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
sort_by.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
source.rs Source path including tilda (#3059) 2021-02-15 21:41:49 +13:00
split_by.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
tags.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
termsize.rs change help text (#3054) 2021-02-13 13:20:34 -06:00
to.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_csv.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_delimited_data.rs Move filesize to use bigint (#2984) 2021-01-30 11:35:18 +13:00
to_html.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_json.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_md.rs Minimal markdown syntax per element support. (#2997) 2021-02-02 12:09:19 -05:00
to_toml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_tsv.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_url.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_xml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
to_yaml.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
touch.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
uniq.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
update.rs Ensure selection of columns are done once per column (#3012) 2021-02-05 19:34:26 -05:00
version.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
where_.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
which_.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
with_env.rs Keep the environment properly set. (#3072) 2021-02-18 15:56:14 +13:00
wrap.rs Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00