Commit Graph

11 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 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
Elbert Ronnie b7d6b1eea7
Updated clap to version 4.0 (#476)
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
2022-10-29 19:46:10 +05:30
Ajeet D'Souza 612f264dd4
Upgrade to Nushell 0.61 (#362) 2022-04-22 13:11:11 +05:30
Ajeet D'Souza b71d33b5c1 Replace `--no-aliases` with `--no-cmd` 2022-04-11 03:41:51 +05:30
Ajeet D'Souza 0a9081383d Fix interactive remove 2021-12-24 17:49:36 +05:30
Ajeet D'Souza 339a789261 Avoid using completions on older Bash versions 2021-12-24 10:04:37 +05:30
Ajeet D'Souza 7ec9ad6a27 Add auto-generated completions for Fig 2021-10-21 03:53:20 +05:30