From d01cbbb5a91ed75e82f0071cd751a3842e51bac8 Mon Sep 17 00:00:00 2001 From: reonokiy Date: Wed, 2 Apr 2025 11:10:29 +0800 Subject: [PATCH] update --- .../Microsoft.PowerShell_profile.ps1.tmpl | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl index 6435f16..2e9a761 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl @@ -26,12 +26,19 @@ function ya { Remove-Item -Path $tmSp } -# remove built-in alias - -remove-item alias:curl -remove-item alias:ls -remove-item alias:cp -remove-item alias:rm +# # remove built-in alias +# if (Get-Command curl -ErrorAction SilentlyContinue) { +# remove-item alias:curl +# } +# if (Get-Command ls -ErrorAction SilentlyContinue) { +# remove-item alias:ls +# } +# if (Get-Command cp -ErrorAction SilentlyContinue) { +# remove-item alias:cp +# } +# if (Get-Command rm -ErrorAction SilentlyContinue) { +# remove-item alias:rm +# } # alias