W3cubDocs

/Nushell

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:

input output
nothing nothing

Examples

Keep a custom command after hiding the overlay

>modulespam { export deffoo [] { "foo" } }
overlay usespam
defbar [] { "bar" }
overlay hidespam--keep-custom
bar


Hide an overlay created from a file

>'export alias f = "foo"'|savespam.nu
overlay usespam.nu
overlay hidespam

Hide the last activated overlay

>modulespam { export-env { $env.FOO="foo" } }
overlay usespam
overlay hide

Keep the current working directory when removing an overlay

>overlay newspam
cdsome-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

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