Command: alias

  ALIAS creates, displays or removes an alias for use on the
  command line.

Syntax:

  ALIAS
  ALIAS [variable[=][string]]
  ALIAS [/?]

Options:

  variable  Specifies the alias name.
  string    Specifies a series of characters to assign to the alias.
  /?        Shows the help.

Comments:

  Type ALIAS without parameters to display the current ALIASES.
  ALIAS variable=string assigns the specified string to the ALIAS with
  the specified name.
  Type "ALIAS variable=" (without string) to delete the ALIAS again.
  Once an ALIAS is defined a command line of the form: name { argument }
  is replaced by: <<string>> { argument } .
  This mechanism is called ALIAS expansion, because the ALIAS name
  expands to the specified <<string>>. To prevent ALIAS expansion the
  command must be prefixed by one asterisk, e.g.: *name arguments.
  FreeDOS itself also uses ALIAS. Therefore, please be careful when
  deleting ALIASES. To make an ALIAS permanent add it in AUTOEXEC.BAT /
  FDAUTO.BAT
  ALIASES are stored in the context segment (Aliases) of command.com,
  for more information see: COMMAND /E:nnn and MEMORY.
  ALIAS is a command internal to command.com and needs no other file
  in order to work.

Examples:

  Example 1:
  Alias dir=dir/w    and then:
  c:> dir            Displays wide directory listing from now on.

  Example 2:
  Alias              Displays a list of all currently defined aliases:
    DIR=dir /w       In this case only this result.

  Example 3:
  Alias text=edit    If you type "text" + ENTER the editor will be opened
                     with an empty .txt file. Of course, you could type:
                     Alias text=edit C:\DOCUMENT\humpf.txt - this would
                     always open edit with this document. In this case
                     the path C:\DOCUMENT has to exist before.
  Alias              Should now show the result of Example 1 and 2:
    dir=dir/w AND
    text=edit

  Alias text=        The variable text is deleted. If you now type "text",
                     the editor will not be opened, you will get an error
                     message: command "text" not found!

  Alias              Should now show the following:
    dir=dir /w       but NOT: text=edit as it was deleted.

  Alias dir=         The variable dir is deleted. From now on dir displays
                     no longer the wide listing but the long listing as
                     by default again.

  Alias              Should no longer show dir AND text, only other alias.

See also:

  autoexec.bat/fdauto.bat
  command.com/freecom
 (doskey)
  history
  memory
  set

  Copyright © 2003 Robert Platt, updated 2007 and 2022 by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.