diff --git a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 index f7a95a3..91a82ca 100644 --- a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 +++ b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 @@ -54,7 +54,7 @@ function ADUserInfo { Get-ADUser -Properties $ADPropertiesGet -Identity $User | Select-Object -Property $ADPropertiesPrint } -Function mkcd { +function mkcd { param ( [Parameter(Mandatory)] [string]$Path @@ -63,6 +63,12 @@ Function mkcd { Set-Location -Path $Path } +if ($IsWindows -or ($env:OS -eq "Windows_NT")) { + function who { + & "$env:SystemRoot\System32\query.exe" user + } +} + Set-PSReadlineOption -BellStyle None Set-PSReadlineOption -EditMode Emacs Set-PSReadlineKeyHandler -Key Tab -Function Complete