Bash.Builtin.Unset (Bash v0.6.0)

Copy Markdown View Source

unset [-fvn] [name ...]

Remove variables or functions.

Each NAME refers to a variable; if there is no variable by that name, a function with that name, if any, is unset.

Options:

  • -f - treat each NAME as a shell function
  • -v - treat each NAME as a shell variable
  • -n - treat each NAME as a name reference and unset the variable itself
       rather than the variable it references

Without options, unset first tries to unset a variable, and if that fails, tries to unset a function.

Exit Status: Returns success unless an invalid option is given or a NAME is read-only.

Reference: https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html

Summary

Types

mode()

@type mode() :: :variable | :function | :nameref