hide

Hide symbols in the current scope

Signature

> hide (pattern)

Parameters

  • pattern: import pattern

Notes

Symbols are hidden by priority: First aliases, then custom commands, then environment variables.

This command is a parser keyword. For details, check:
  https://www.nushell.sh/book/thinking_in_nushell.html

Examples

Hide the alias just defined

> alias lll = ls -l; hide lll

Hide a custom command

> def say-hi [] { echo 'Hi!' }; hide say-hi

Hide an environment variable

> let-env HZ_ENV_ABC = 1; hide HZ_ENV_ABC; 'HZ_ENV_ABC' in (env).name