Skip to content

Commit

Permalink
Merge pull request #18 from F-park/refactor_alias
Browse files Browse the repository at this point in the history
refactor(module): update alias
  • Loading branch information
abgox authored Jul 20, 2024
2 parents 32fe466 + 32dc6a4 commit d88361a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions module/PSCompletions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@ function PSCompletions {
if ($alias -like "* *") {
$alias = ($alias -split ' ')[0]
}
$exist_cmd = (Get-Command).Name | Where-Object { $alias -eq $_ }
$exist_alias = (Get-Alias).Name | Where-Object { $alias -eq $_ }
if ($exist_cmd -or $exist_alias) {
if ($alias -in (Get-Alias).Name -or $alias -in (Get-Command).Name) {
Show-ParamError 'err' '' $PSCompletions.info.alias.add.err.cmd_exist
return
}
Expand Down

0 comments on commit d88361a

Please sign in to comment.