Part 1ArticleI said that in order to change users' criticism on their console interface, Windows Vista started and planned to change this situation.
The appearance of powershell.
1. compatible with shell commands
To be compatible with Unix/Linux shell(the master is the command line of bash‑compatible with cmd.exe and bash commands. This is what we mentioned in the previous article.
. Is a powershell-compatible cmd command and Unix/Linux Shell Command.
2. Alias of Standard Commands
Similarly, powershell also provides a mechanism to support command aliases with built-in cmdlets.
We know that eaglets adopts the same user interface mode: verb-noun. As mentioned above, the alias mentioned above is used to be compatible with other console interface commands, while the built-in command
Aliases are set for ease of use. Powershell provides a set of shorthand names for Common commands Based on verb and Noun names.
For example:
Verb command Abbreviation/alias
Get g
Set S
Item I
Location L
Command cm
In this way, GI is equivalent to get-item.
Si is equivalent to set-item.
These aliases are automatically loaded during powershell startup. If you set the command line alias again in the command line, an error is displayed, as shown in:
3. Automatic tab Filling
Powershell also inherits the Automatic completion function of the tab key. However, this function is different from the tab function of CMD and bash. The tab Extension function in powershell is implemented through functions.
The function is controlled by tabexpansion. Because built-in functions can be modified in powershell, you must note that.
When you type a command, if you want to use the tab key to supplement the file name or path, after you type a part of the file name or path, press the tab key, powershell will automatically add the command as the first
Configuration items. If you repeatedly press the tab key, all available options are displayed one by one.
If you are typing a cmdlet, it is different from the supplemental file name and path. If you want to use tab extension for the cmdlet name, you need to enter the first part of the name and the following hyphen. Can be filled
More parts of the name have been matched. For example, if you type get-C and then enter the tab key, the get-childitem command is automatically supplemented. If you continue to press the tab key, the command supplemented is get-Com.
Command.
Note the following when using command line auto-completion: the tan key is interpreted as the auto-completion command function at any time. Therefore, when copying commands to shell, you must note that the copied content
It cannot be followed by the tab key.