зеркало из https://github.com/mono/nuget.git
Fix for #4: Create aliases for Verb-Noun cmdlets.
Add aliases to package commands.
This commit is contained in:
Родитель
a33ceda8ee
Коммит
e4e33d73fa
|
@ -302,15 +302,15 @@ function global:TabExpansion($line, $lastWord) {
|
|||
}
|
||||
|
||||
switch ($tokens[0]) {
|
||||
'Add-Package' {
|
||||
{ $_ -eq 'Add-Package' -or $_ -eq 'nap' } {
|
||||
$choices = _TabExpansionForAddPackage $secondLastToken $tokens.length $filter
|
||||
}
|
||||
|
||||
'Remove-Package' {
|
||||
{ $_ -eq 'Remove-Package' -or $_ -eq 'nrp' } {
|
||||
$choices = _TabExpansionForRemovePackage $secondLastToken $tokens.length $filter
|
||||
}
|
||||
|
||||
'Update-Package' {
|
||||
{ $_ -eq 'Update-Package' -or $_ -eq 'nup' } {
|
||||
$choices = _TabExpansionForRemovePackage $secondLastToken $tokens.length $filter
|
||||
}
|
||||
|
||||
|
@ -490,4 +490,12 @@ function global:_IsSupportedProject($project) {
|
|||
"{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") # VB Project
|
||||
|
||||
return $project.Kind -and $supportedProjectTypes -contains $project.Kind
|
||||
}
|
||||
}
|
||||
|
||||
# assign aliases to package cmdlets
|
||||
|
||||
New-Alias 'nnp' 'New-Package'
|
||||
New-Alias 'nlp' 'List-Package'
|
||||
New-Alias 'nap' 'Add-Package'
|
||||
New-Alias 'nrp' 'Remove-Package'
|
||||
New-Alias 'nup' 'Update-Package'
|
Загрузка…
Ссылка в новой задаче