Skip to content

Any idea how to create the equivalent to "cd --" in powershell? #6

@E3V3A

Description

@E3V3A

I found you great powershell aliases to get nix style back into PS.

I've been looking for a while, to find the fantastic equivalent to using cd -- in linux/bash, to get the last visited directories.

$ cd --
 0  /cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib/x64
 1  /cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib
 2  /cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2
 3  /cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/tools
 4  /cygdrive/d/avatarify/avatarify
 5  /cygdrive/d/avatarify
 6  /cygdrive/d
 7  ~

Then you can just do cd -4 to go there.

I use this 100 times a day, even under Cygwin, but I can't find anything like it in Windows powershell. The closest info is here.

Any ideas how to implement this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions