Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

overlay hide for core

Hide an active overlay.

Signature

> overlay hide {flags} (name)

Flags

  • --keep-custom, -k: Keep all newly added commands and aliases in the next activated overlay.
  • --keep-env, -e {list<string>}: List of environment variables to keep in the next activated overlay

Parameters

  • name: Overlay to hide.

Input/output types:

inputoutput
nothingnothing

Examples

Keep a custom command after hiding the overlay

> module spam { export def foo [] { "foo" } }
    overlay use spam
    def bar [] { "bar" }
    overlay hide spam --keep-custom
    bar

Hide an overlay created from a file

> 'export alias f = "foo"' | save spam.nu
    overlay use spam.nu
    overlay hide spam

Hide the last activated overlay

> module spam { export-env { $env.FOO = "foo" } }
    overlay use spam
    overlay hide

Keep the current working directory when removing an overlay

> overlay new spam
    cd some-dir
    overlay hide --keep-env [ PWD ] spam

Notes

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