Expanding and Disabling Aliases

A few command line options are specifically related to aliases, and are documented briefly here for completeness. If you are not familiar with aliases, see Aliases and the ALIAS command for complete details.

 

You can expand an alias on the command line and view or edit the results by pressing Ctrl-F before the command is executed. This is useful when you are developing and debugging a complex alias or if you want to make sure that an alias that you may have forgotten won't change the intent of your command.

 

At times, you may want to temporarily disable an alias that you have defined. To do so, precede the command with an asterisk (*). For example, if you have an alias for DIR which changes the display format, you can use the following command to bypass the alias and display the directory in the standard format:

 

*dir

 

Note: The leading asterisk is crucial in aliases that redefine existing commands, such as:

 

DIR=*dir /w

 

Without the asterisk, you would trigger an alias loop error whenever you try to use that alias, since it will endlessly try to redefine itself.