1. 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

  2. cd

    cd path is a most common way to change dir, if you go this command like cd 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
    4
    function Go-xxx {
    Set-Location -Path "xxx"
    }
    Set-Alias -Name x -Value Go-xxx

    alternative choice cd

    BTW, my cd config

    Set-Alias -Name .. -Value cd ..


    refs

    it