windows powershell
Alias
set alias format:
Set-Alias -Name youwant -Value original command
check alias
Get-alias name
using powershell ise to profile it, see the cd link below
cd
cd path
is a most common way to change dir, if you go this command likecd xxxx
in a bash script to short the long path name mapping, you will suprisely find it seems to change nothing. Cause, the script is anther process, and it does cd in that process while in you cunrrent terminal process, you see it keep itself.to do this, you can set a function
1
2
3
4function Go-xxx {
Set-Location -Path "xxx"
}
Set-Alias -Name x -Value Go-xxxalternative choice cd
BTW, my cd config
Set-Alias -Name .. -Value cd ..
refs
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.