Add hide-env to hide environment variables (#6313)

* Add hide-env to hide env vars; Cleanup tests

Also, there were some old unalias tests that I converted to hide.

* Add missing file

* Re-enable hide for env vars

* Fix test

* Rename did you mean error back

It was causing random tests to break
This commit is contained in:
Jakub Žádník
2022-08-13 12:55:06 +03:00
committed by GitHub
parent 3b6c4c1bb5
commit 20528e96c7
8 changed files with 139 additions and 80 deletions

View File

@ -626,6 +626,15 @@ Either make sure {0} is a string, or add a 'to_string' entry for it in ENV_CONVE
#[diagnostic(code(nu::shell::name_not_found), url(docsrs))]
DidYouMean(String, #[label("did you mean '{0}'?")] Span),
/// A name was not found. Did you mean a different name?
///
/// ## Resolution
///
/// The error message will suggest a possible match for what you meant.
#[error("{0}")]
#[diagnostic(code(nu::shell::did_you_mean_custom), url(docsrs))]
DidYouMeanCustom(String, String, #[label("did you mean '{1}'?")] Span),
/// The given input must be valid UTF-8 for further processing.
///
/// ## Resolution