Home Explore Blog CI



nushell

commands/docs/hide-env.md
b8882a91a838487aa698fe3c61fcd040813e8f6b95d5442c0000000300000388
---
title: hide-env
categories: |
  core
version: 0.104.0
core: |
  Hide environment variables in the current scope.
usage: |
  Hide environment variables in the current scope.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `hide-env` for [core](/commands/categories/core.md)

<div class='command-title'>Hide environment variables in the current scope.</div>

## 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
```nu
> $env.HZ_ENV_ABC = 1; hide-env HZ_ENV_ABC; 'HZ_ENV_ABC' in $env
false
```

Chunks
78013430 (1st chunk of `commands/docs/hide-env.md`)
Title: hide-env: Hide Environment Variables in Nushell
Summary
The `hide-env` command in Nushell allows you to hide environment variables within the current scope. It takes a list of environment variable names as input and removes them from the current environment. The `--ignore-errors` flag prevents errors if a variable is not found. This command is useful for managing environment variable visibility and preventing unintended access.