Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be great to see a list of most recent #107

Open
E3V3A opened this issue May 15, 2020 · 2 comments
Open

It would be great to see a list of most recent #107

E3V3A opened this issue May 15, 2020 · 2 comments

Comments

@E3V3A
Copy link

E3V3A commented May 15, 2020

I love lists. The Bash similar (but not default) cd -- give you a list of the (up to) 10 last directories you've been to. You can then use cd -3 to go to the 3rd last one.

I have documented this here, and would love to see this in Powershell.

@theaquamarine
Copy link
Collaborator

A limited version of this is natively in PowerShell 6.2 and above- PowerShell 6.2 added support for - and + with the Path parameter. PowerShell maintains a history of the last 20 locations that can be access with - and +, though it can't jump to numbered locations and weirdly there doesn't seem to be a way to display the stack...
There's a version of Set-Location called Set-LocationEx in Pscx that I think does everything you're after, though https://github.com/Pscx/Pscx/blob/master/Src/Pscx/Modules/CD/Pscx.CD.psm1#L78

@FeralWhippet
Copy link

Better than this would be to see what is on the stack (after popping the stack with "z -", the stack will be different than the list of recently visited directories). I see the comment above about no way to display the stack, I thought "Get-Location -Stack" was supposed to do that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants