Giter VIP home page Giter VIP logo

Comments (5)

cole-h avatar cole-h commented on July 28, 2024

I think I'm -1 on this. If a user wants a fresh start or wants to resolve database corruptions, they should just delete the database by hand with rm ~/.local/share/zoxide/db.zo (or wherever they put it). This way it's unambiguously being removed, permanently and with no chance of recovery.

A subcommand that prints the in-use DB's path might be useful to assist in that, but I don't think something this destructive should be possible -- at least not without a LOT of warnings, confirmations, and trapdoors to escape through.

from zoxide.

ajeetdsouza avatar ajeetdsouza commented on July 28, 2024

Deleting the database by hand is rather painful for Windows/macOS users, since the DB path is not as memorable.

from zoxide.

cole-h avatar cole-h commented on July 28, 2024

That's a fair point. I'd still prefer if it wasn't baked in and instead something that would have to be done manually. Something like:

$ zoxide db-path # or some other subcommand name
"/Users/Alice/Library/Application Support/zoxide/db.zo" # quoted because of the space, just to be safe

$ rm "$(zoxide db-path)"

This way, the user expresses their intent to delete the database and all responsibility falls on them, rather than going up through their shell history, seeing zoxide and pressing enter, not noticing the fact that it actually said zoxide remove-db (a contrived example, but hopefully you see my point)

from zoxide.

ajeetdsouza avatar ajeetdsouza commented on July 28, 2024

That does make sense, although that risk would be removed if we added a confirmation prompt.

I understand why you're against this, but I think something like zoxide clear would be a lot more intuitive - the user shouldn't have to deal with zoxide data manually.

from zoxide.

cole-h avatar cole-h commented on July 28, 2024

I suppose as long as there are safeguards in place, I'm neutral on this (still leaning negative, though).

from zoxide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.