[英]What's the difference between Powershell's New-Alias and Set-Alias cmdlets?
Other than Set-Alias
being able to change extant aliases, what's the difference between these commands? 除了
Set-Alias
能够改变现存的别名之外,这些命令之间有什么区别?
Why would someone use New-Alias
over Set-Alias
? 为什么有人会使用
New-Alias
不是Set-Alias
?
One (the only one?) advantage in using new-alias
is that you will get an error when you override an existing alias. 使用
new-alias
一个(唯一的?)优势是,当您覆盖现有别名时,您将收到错误。 Otherwise they are synonyms when it comes to alias creation, to quote from help -full new-alias
: 否则,在创建别名时,它们是同义词,引用
help -full new-alias
:
To create a new alias, use Set-Alias or New-Alias.
要创建新别名,请使用Set-Alias或New-Alias。 To change an alias, use Set-Alias.
要更改别名,请使用Set-Alias。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.