superfile icon indicating copy to clipboard operation
superfile copied to clipboard

Zoxide Integration for frequently visited directories

Open Simpaqt opened this issue 9 months ago β€’ 3 comments

Is your feature request related to a problem? Please describe. Unrelated to a problem, but I believe it would be a beneficial feature

Describe the solution you'd like You bind a key to pull up a window with your Zoxide history, in which you can also search for keywords.

Additional context

Screenshot of Zoxide history: Image

Simpaqt avatar Mar 01 '25 03:03 Simpaqt

This looks interesting and useful.

lazysegtree avatar Mar 02 '25 06:03 lazysegtree

That would be great! Yazi uses fd and rg for quick folder navigation, which is awesome.

b0lle avatar Mar 03 '25 13:03 b0lle

I am working on a plugin right now. Don't know how far I will get, but I figured I would take a crack at it.

Simpaqt avatar Mar 06 '25 12:03 Simpaqt

Duplicate of

  • https://github.com/yorukot/superfile/issues/891

lazysegtree avatar Sep 04 '25 05:09 lazysegtree

  • https://github.com/yorukot/superfile/pull/1039
Image

Next steps

  • Add unit tests by using library's WithDataDir to avoid polluting main zoxide data
  • Allow functionality to use customer zoxide dir for superfile only
  • Add functionality to do zoxide add while changing directories in superfile
  • Update error handling, etc.

lazysegtree avatar Sep 04 '25 06:09 lazysegtree

@b0lle @Simpaqt @eyalevy23 This has been added in 1.4.0-rc1. Can you try out that pre-release and let us know if it is looks good?

lazysegtree avatar Sep 11 '25 02:09 lazysegtree

@b0lle @Simpaqt @eyalevy23 This has been added in 1.4.0-rc1. Can you try out that pre-release and let us know if it is looks good?

I can give it a spin later today πŸ‘β˜ΊοΈ

Simpaqt avatar Sep 11 '25 07:09 Simpaqt

@b0lle @Simpaqt @eyalevy23 This has been added in 1.4.0-rc1. Can you try out that pre-release and let us know if it is looks good?

I have been playing around with it for a bit. Functionally it works fast and smooth. Although J & K seems to just traverse the menu and is not characters for typing.

The Zoxide panel doesnt look quite bad either, maybe some touch ups on the border.

Quite solid and usable.

EDIT: The panel is fine. Was a theme issue.

Simpaqt avatar Sep 11 '25 14:09 Simpaqt

Although J & K seems to just traverse the menu and is not characters for typing.

Ohh. Thats not good. I missed this. Thanks for catching this @Simpaqt . We will fix this before 1.4.0 release

lazysegtree avatar Sep 11 '25 14:09 lazysegtree

Pending improvements Thansk @Simpaqt and @NSPC911 for taking time to check the pre-release

  • Fix input of J & K keys
  • Make zoxide async
  • Handle multi-word queries
  • Handle 4 digit score.

lazysegtree avatar Sep 12 '25 02:09 lazysegtree

@lazysegtree there also seems to be an issue with the layout when the weight of a path is longer than 6 characters.

Image

Frost-Phoenix avatar Sep 12 '25 15:09 Frost-Phoenix

i think he didnt account for people that cd so much into the directory that it goes into 4 digits :shipit:

NSPC911 avatar Sep 12 '25 15:09 NSPC911

@Frost-Phoenix Thanks for catching this. Will fix this too.

lazysegtree avatar Sep 12 '25 17:09 lazysegtree

I have an issue when zoxide plugin is enabled. Opening current directory with spf . opens a random directory in my Downloads folder instead of the current directory in the shell. The same issue happens when the default_directory = "." in the config file, (for now I set it to ~). Other then this issue, spf act as z opening fuzzy directory name. Disabling the zoxide plugin fixes the issue, opening current shell directory with spf . I am using spf version 1.3.3 on fedora 42 with the latest updates. Please advice, Thank you!

zakweb3 avatar Oct 02 '25 14:10 zakweb3

@zakweb3 Sorry about that. Its a known issue. Can you try 1.4.0-rc1 ?

lazysegtree avatar Oct 02 '25 14:10 lazysegtree

https://github.com/yorukot/superfile/releases/tag/v1.4.0-rc1

lazysegtree avatar Oct 02 '25 14:10 lazysegtree

Update was successful:

Downloading superfile v1.4.0-rc1 for linux (amd64)...

Extracting superfile...
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
Installing superfile...
Press ctrl+C to not install as sudo and try locally.
[sudo: a password is required
Unable to move binary to /usr/local/bin. Do you have sudo permissions?
πŸŽ‰ Local Installation complete!

I tested and the issue is indeed fixed!

$spf .
Error ┃ missing fields: [cd_quit permanently_delete_items open_zoxide]
To add missing fields to hotkeys file automatically run superfile with the --fix-hotkeys flag `spf --fix-hotkeys`
$spf --fix-hotkeys
Error ┃ config file had issues. Its fixed successfully. Original backed up to

Thank you for creating, improving and maintaining this excellent utility!

zakweb3 avatar Oct 02 '25 22:10 zakweb3

Fixing all issues here

  • https://github.com/yorukot/superfile/pull/1105

lazysegtree avatar Oct 04 '25 04:10 lazysegtree

@Frost-Phoenix @Simpaqt Released 1.4.0-rc2 with these fixes.

  • Fix the input of J & K keys
  • Make zoxide async
  • Handle multi-word queries
  • Handle 4-digit score.

Please check. https://github.com/yorukot/superfile/releases/tag/v1.4.0-rc2

lazysegtree avatar Oct 04 '25 07:10 lazysegtree

Release 1.4.0 https://github.com/yorukot/superfile/releases/tag/v1.4.0

lazysegtree avatar Oct 10 '25 06:10 lazysegtree