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

What is the format of the db.zo file? #961

Closed
code-IM-perfect opened this issue Dec 28, 2024 · 5 comments
Closed

What is the format of the db.zo file? #961

code-IM-perfect opened this issue Dec 28, 2024 · 5 comments

Comments

@code-IM-perfect
Copy link

Hi I'm sorry this is not an issue, but I want to integrate zoxide into my c++ application.

I am not very experienced in rust and am struggling to find how zoxide stores info in the db.zo file. Can you please explain this to me or direct me to some resource for understanding how it reads and writes to the file.

@ajeetdsouza
Copy link
Owner

Could you tell me about what exactly you're trying to build?

There are a lot of tools out there that integrate with zoxide (see the bottom of the README for examples). The way they do it (which is the recommended way) is to run the zoxide command in a subprocess and pipe the output to your program.

zoxide --help should help get you started.

@code-IM-perfect
Copy link
Author

I love the integration with yazi and was thinking of contributing towards adding integration to dolphin. I am just probing the feasibility of such an integration, and seeing the optional-dependencies of Dolphin, I'm not sure if they'll allow a non-kde dependency even if it is optional.

I want to make it clear that I am probing about it as an individual and have no affiliation with KDE itself and have not talked to anyone in KDE regarding this.

@ajeetdsouza
Copy link
Owner

You won't need any dependencies, just use it with popen and pipe as I described earlier - that's how yazi does it too. The manpages / help file should give you all the info you need to build a plugin, but feel free to create an issue if you have any questions!

@code-IM-perfect
Copy link
Author

code-IM-perfect commented Dec 30, 2024

@ajeetdsouza I mean I would need zoxide as a dependency in order to popen zoxide, right?

@ajeetdsouza
Copy link
Owner

ajeetdsouza commented Dec 30, 2024

popen is not a library dependency - you can just attempt to launch the binary, if it fails you could prompt the user to install zoxide.

zoxide "depends" on fzf in a similar way.

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