Powershell: Make path a alias for cd env:

Created on 17 Aug 2020  路  2Comments  路  Source: PowerShell/PowerShell

Summary of the new feature/enhancement

It would be a cool feature to make the command 'path' or 'PATH' redirect you to the 'cd env:' environment because that is pretty much what it represents.

Issue-Enhancement Resolution-Answered

Most helpful comment

Is this a thing I just have never heard of that's common in Bash or something? I'm a bit lost as to what the intended effect is, to be honest.

Anyway, you can do something like this by defining a short function in your profile:

function path {
    Set-Location env:
}

All 2 comments

Is this a thing I just have never heard of that's common in Bash or something? I'm a bit lost as to what the intended effect is, to be honest.

Anyway, you can do something like this by defining a short function in your profile:

function path {
    Set-Location env:
}

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Was this page helpful?
0 / 5 - 0 ratings