From 0832da5147fb0a154b3e42051a89898ba2f58ce2 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 21 Oct 2023 11:53:23 +0800 Subject: [PATCH] PowerShell | just run it --- PowerShell/Microsoft.PowerShell_profile.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/PowerShell/Microsoft.PowerShell_profile.ps1 b/PowerShell/Microsoft.PowerShell_profile.ps1 index 062e7da..770ad09 100644 --- a/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -21,11 +21,7 @@ Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward function pythons { (8, 9, 10, 11, 12) | ForEach-Object { - if ($args.Count -eq 0) { - Invoke-Expression "python3.$_ -c 'import sys;print(sys.version)'" - } else { - Invoke-Expression "python3.$_ $args" - } + &"python3.$_ $args" } }