Purpose: | Remove aliases from the alias list |
Format: | UNALIAS [/Q /R file... (alias ...)] alias... |
or
UNALIAS *
alias | One or more aliases to remove from memory. |
file | One or more files from which to read the aliases to be undefined. |
File Completion Syntax:
The default filename completion syntax is: [/r] * [1*] aliases
Usage:
TCC maintains a list of the aliases that you have defined. The UNALIAS command will remove aliases from that list. UNALIAS supports wildcards in the alias name.
You can use regular expressions in the alias name.
Examples:
To remove the alias DDIR:
unalias ddir
To remove all the aliases:
unalias *
To remove all the aliases that begin with "DD":
unalias dd*
You can delete all matching aliases except for those specified by enclosing the exceptions in parentheses. For example, to remove all aliases beginning with "a" except for alias1 and alias2:
unalias (alias1 alias2) a*
If you keep aliases in a file that can be loaded with the ALIAS /R command, you can remove the aliases by using the UNALIAS /R command with the same file name:
unalias /r alias.lst
This is much faster than removing each alias individually in a batch file, and can be more selective than using UNALIAS *. UNALIAS /R accepts all of the alias definition formats you can use in a file for ALIAS /R.
Options:
/R | Read the list of aliases to remove from a file. The file format should be the same format as that used by the ALIAS /R command. You can use multiple files with one UNALIAS /R command by placing the names on the command line, separated by spaces: |
unalias /r alias1.lst alias2.lst
UNALIAS /R will read from stdin if no filename is present and input is redirected.