How to use PowerShell alias cd a spec directory?

前端 未结 2 608
猫巷女王i
猫巷女王i 2021-01-11 13:29

On Linux

alias cdt=\'cd /usr/a\'

make a alias that when I type

cdt

I change the workpath to /use/a

<
2条回答
  •  有刺的猬
    2021-01-11 14:01

    Aliases can't use parameters, so define a function instead.

    function cdt { set-location "F:\a" }
    

提交回复
热议问题