old-alias for core

Alias a command (with optional flags) to a new name.

Signature

> old-alias (name) (initial_value)

Parameters

  • name: name of the alias
  • initial_value: equals sign followed by value

Notes

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

Examples

Alias ll to ls -l

> old-alias ll = ls -l

Make an alias that makes a list of all custom commands

> old-alias customs = ($nu.scope.commands | where is_custom | get command)