W3cubDocs

/Nushell

hide-env for core

Hide environment variables in the current scope.

Signature

> hide-env {flags} ...rest

Flags

  • --ignore-errors, -i: do not throw an error if an environment variable was not found

Parameters

  • ...rest: environment variable names to hide

Input/output types:

input output
nothing nothing

Examples

Hide an environment variable

>$env.HZ_ENV_ABC=1;hide-envHZ_ENV_ABC;'HZ_ENV_ABC'in (env).name
false

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/hide-env.html