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

Feature request: Add directory history support #815

Closed
jmg-duarte opened this issue May 14, 2024 · 2 comments
Closed

Feature request: Add directory history support #815

jmg-duarte opened this issue May 14, 2024 · 2 comments

Comments

@jmg-duarte
Copy link

Hey, thanks for the great project, I was skeptical at first but now I can't live without zoxide!

As for my feature, some context —I keep going back and forth with a mix of .. and friends, however, sometimes I overshoot or just want to go back to the directory I was in 3 z's back.

Having something like zhist that has an fzf interface to select one of previous directories would be amazing.

@ajeetdsouza
Copy link
Owner

ajeetdsouza commented May 15, 2024

Is this the same as #784? If we add a flag to sort directories by time, you should be able to view it in fzf, too.

@jmg-duarte
Copy link
Author

Yes, it seems so, though I don't care for time or frequency, just the order. But it seems to, more or less, solve the same thing.

Apologies for the duplicate!

@jmg-duarte jmg-duarte closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
mzacho added a commit to mzacho/zoxide that referenced this issue Jul 15, 2024
Added the option `--sort-by [score|path|last-accessed]` for the `query`
subcommand with default value `score` i.e:

```bash
$ zoxide query --list --score --sort-by last-accessed
   4.0 /home/martin/playground/scala/scala-3-project-template
   3.5 /home/martin/playground/rust
   3.8 /home/martin/playground/python
  12.0 /home/martin/projects/zoxide
  11.8 /home/martin/playground
  16.5 /home/martin/projects/thesis
   6.0 /home/martin/projects/thesis/frontend
...
```

```bash
$ zoxide query --list --score --sort-by path
   0.2 /home/martin/.local/state
   0.2 /home/martin/.local/share/zoxide
   0.2 /home/martin/.local/share
   0.2 /home/martin/.config/protonmail/bridge-v3
   0.2 /home/martin/.config/protonmail
   0.5 /home
   0.5 /etc/nixos/lib/lisp
   0.8 /
...
```

```bash
$ zoxide query --list --score
  16.5 /home/martin/projects/thesis
  16.0 /home/martin/projects/zoxide
   8.0 /home/martin/projects/egcd
   8.0 /persist
   6.0 /home/martin/projects/thesis/frontend
...
```

Fixes ajeetdsouza#784 as well as ajeetdsouza#815.
mzacho added a commit to mzacho/zoxide that referenced this issue Jul 15, 2024
Added the option `--sort-by [score|path|last-accessed]` for the `query`
subcommand with default value `score` i.e:

```bash
$ zoxide query --list --score --sort-by last-accessed
   4.0 /home/martin/playground/scala/scala-3-project-template
   3.5 /home/martin/playground/rust
   3.8 /home/martin/playground/python
  12.0 /home/martin/projects/zoxide
  11.8 /home/martin/playground
  16.5 /home/martin/projects/thesis
   6.0 /home/martin/projects/thesis/frontend
...
```

```bash
$ zoxide query --list --score --sort-by path
   0.2 /home/martin/.local/state
   0.2 /home/martin/.local/share/zoxide
   0.2 /home/martin/.local/share
   0.2 /home/martin/.config/protonmail/bridge-v3
   0.2 /home/martin/.config/protonmail
   0.5 /home
   0.5 /etc/nixos/lib/lisp
   0.8 /
...
```

```bash
$ zoxide query --list --score
  16.5 /home/martin/projects/thesis
  16.0 /home/martin/projects/zoxide
   8.0 /home/martin/projects/egcd
   8.0 /persist
   6.0 /home/martin/projects/thesis/frontend
...
```

Fixes ajeetdsouza#784 as well as ajeetdsouza#815.
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

2 participants