zoxide icon indicating copy to clipboard operation
zoxide copied to clipboard

Feature Request: add support for increment/decrement subcommands

Open JS-Zheng opened this issue 3 years ago • 2 comments

Background

Our team has a large project, which has multiple branches located in different paths (has the same directory structures), for example:

  • /branch_a/device/driver/
  • /branch_b/device/driver/
  • /branch_c/device/driver/

Therefore, a directory name is not an effective factor for this case, adjusting rank/weight is a very useful feature for us.

FR

Add an inc(rement) subcommand and a dec(rement) to update rank/weight manually.

For example:

# increment rank by default value
zoxide inc /branch_a/device/driver/  

# decrement rank by default value
zoxide dec /branch_b/device/driver/     

# increment rank by the specified value
zoxide inc=10 /branch_c/device/driver/ 

JS-Zheng avatar May 17 '22 19:05 JS-Zheng

Have you tried the <SPACE><TAB> completions that ship with zoxide v0.8.0+? They seem ideal for this kind of structure.

In case you're not familiar with how it works, there's a GIF in the README.

ajeetdsouza avatar May 19 '22 12:05 ajeetdsouza

Yes, I usually use <SPACE><TAB> fzf completions. However, I want to increase the rank of the recently developed branches, or reduce the rank of the outdated branches that has entered the maintenance cycle, so that the order of fzf completions can be more effective.

JS-Zheng avatar May 19 '22 12:05 JS-Zheng

Closing in favour of https://github.com/ajeetdsouza/zoxide/issues/453.

ajeetdsouza avatar Sep 17 '22 19:09 ajeetdsouza