Giter Club home page Giter Club logo

Comments (6)

josephwhite avatar josephwhite commented on May 23, 2024

First problem that would need to be addressed is just importing Zoxide's own format (#591).

For PowerShell users, the workaround that I have been using is querying the entire database, converting to an object, formatting the object to a string array to match the format of Z/Autojump, and then writing that to a file. From here, it would be up to the user on how they would want to handle their backups.

from zoxide.

hoofcushion avatar hoofcushion commented on May 23, 2024

@josephwhite Even though we don't have the final format for db.zo, zoxide could still back it up. Maybe make a copy named db.zo.bak. If there's a problem occurred for loading db.zo, zoxide could try to use the backup or just tell user themselves to recovery it. This way, users won't lose their data, and it doesn't depend on a specific data format. What do you think?

from zoxide.

hoofcushion avatar hoofcushion commented on May 23, 2024

I have a temporary workaround of making a copy of db.zo named db.zo.bak every time I call zoxide success, by configure the command z's behavior.

from zoxide.

wswslzp avatar wswslzp commented on May 23, 2024

I have a temporary workaround of making a copy of db.zo named db.zo.bak every time I call zoxide success, by configure the command z's behavior.

Hi @hoofcushion can you share your WAR here?

from zoxide.

hoofcushion avatar hoofcushion commented on May 23, 2024

@wswslzp Here's my ~/.bashrc

if test -n $(command -v zoxide); then
 eval "$(zoxide init $(basename $SHELL))"
 function back() {
  local command="$1"
  shift
  "${command}" "$@"
  if [ $? -eq 0 ]; then
   cp "$HOME/.local/share/zoxide/db.zo" "$HOME/.local/share/zoxide/db.zo.bak"
  fi
 }
 alias cd='back z'
 alias cdi='back zi'
fi

And what does WAR means?

from zoxide.

wswslzp avatar wswslzp commented on May 23, 2024

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.