Commit Graph

12 Commits

Author SHA1 Message Date
Martin Zacho ac98f4044c cmd/query: Add `--sort-by` option
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 #784 as well as #815.
2024-07-15 18:59:02 +02:00
Ajeet D'Souza 1bfcdfacf2 chore(release): v0.9.2 2023-08-04 07:57:38 +05:30
Ajeet D'Souza 153e060043 Add short option -a for --all 2023-05-09 00:51:26 +05:30
Ajeet D'Souza 56956779b2 Consistent style for environment variables 2023-04-16 19:54:55 +05:30
Blonteractor 2c2286cea2
Added better output in query when already in the matched directory (#463) 2023-01-09 15:55:33 +05:30
Ajeet D'Souza 3ab0a7b8fd
Edit subcommand (#498) 2023-01-07 22:58:10 +05:30
Ajeet D'Souza b71d33b5c1 Replace `--no-aliases` with `--no-cmd` 2022-04-11 03:41:51 +05:30
Ajeet D'Souza b3366dd5b6 Upgrade to clap v3.1.0 2022-02-17 04:16:45 +05:30
Ajeet D'Souza 0a9081383d Fix interactive remove 2021-12-24 17:49:36 +05:30
Ajeet D'Souza 53136c2982
Upgrade clap to v3.0.0-beta.4 (#250) 2021-08-15 17:26:56 +05:30
Ajeet D'Souza ba8a5f3167
Add zoxide query --all flag (#206) 2021-05-08 08:35:34 +05:30
XyLyXyRR ef63b555a0
Add shell completions (#200) 2021-05-04 02:33:23 +05:30