[bugfix] powershell6 does not support Set-Prompt

This commit is contained in:
Klesh Wong 2020-08-04 11:49:42 +08:00
parent 96718bb54d
commit 1fe43a2b86

View File

@ -6,7 +6,10 @@
Set-PSReadLineOption -EditMode Emacs
$Env:Path += ";$PSScriptRoot\bin"
Set-Alias -Name k kubectl
Set-Prompt
$isPs7 = $host.Version.Major -ge 7
if ( $isPs7 ) {
Set-Prompt
}
function kcc { k config get-contexts $args }
function kcu { k config use-context $args}
@ -70,4 +73,4 @@ function ssh-copy-id {
)
Get-Content $IdentityFile | ssh $UserHost "umask 077; mkdir -p .ssh ; cat >> .ssh/authorized_keys"
}
}