Comments (6)
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.
@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.
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.
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.
@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.
from zoxide.
Related Issues (20)
- Arch 'MANJARO' with ZSH and Powerlevel10k PROBLEMS HOT 1
- Help with excluding dirs HOT 2
- z "" should act as z with no arguments (go to home directory) HOT 3
- Feature request: "z . some keywords" to find matches in current directory HOT 2
- New Command Idea: Env
- Zoxide "zi" hangs when mount point is in list (/mnt) that's unavailable HOT 1
- Provide a way to configure where a bare `z` command goes HOT 1
- Zoxide's init-script generated for nu-shell fails with error upon sourcing HOT 4
- __zoxide_cd:cd:2: no such file or directory: world! HOT 4
- Autocompletion for fish is not working on my system HOT 3
- Installation using shell script is not working in macOS HOT 1
- aarch64-linux-android not packaged HOT 1
- Feature request: Add directory history support HOT 2
- Feature request: Allow manually specifying high priority paths. HOT 1
- zoxide doesn't go to the previous directory HOT 9
- variant of z/zi but only return the found path without changing directories HOT 1
- Partial match high priority nested path over exact direct descendent (edge-case) HOT 2
- zoxide: no match found
- Error: zoxide has not yet been packaged for your architecture
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoxide.