Comments (8)
It might be a good idea to mention PROMPT_COMMAND in the documentation somewhere, as the reason why zoxide should be last. I set that variable in my bash config as well, and until @kringalf mentioned it in his comment, I didn't notice the order.
from zoxide.
I have the same issue on ubuntu 22.04 but running eval "$(zoxide init bash)"
again doesn't solve the issue here, the db file only grows if i call zoxide add .
in the directory
user@host:~>zoxide --version; fzf --version; alias cd;mkdir /tmp/new_dir;stat --printf="%s\n" ~/.local/share/zoxide/db.zo; cd /tmp/new_dir; cd; stat --printf="%s\n" ~/.local/share/zoxide/db.zo
zoxide 0.9.4
0.46.1 (3c0a630)
alias cd='z'
165
165
from zoxide.
It's possible something else is overriding the prompt. Could you try making zoxide init
the last line in your shell config?
from zoxide.
Note: This is only usefull for my setup since i wanna use the history command in a non default way. So this might only be helpfull for users that also change the bash environment variable PROMPT_COMMAND on their system
For me, with my history -a
addon, it helped setting the PROMPT_COMMAND to:
PROMPT_COMMAND="history -a ; __zoxide_hook;${PROMPT_COMMAND#;}"
Now the db file increases after using cd to a new dir
from zoxide.
eval "$(zoxide init --cmd cd bash)"
is the last line in my config file.
I added the line @kringalf mentioned but I'm still having no luck.
from zoxide.
@aidandeli what's the output of echo "$PROMPT_COMMAND"
? It should contain __zoxide_hook
, otherwise something is overriding your prompt.
from zoxide.
Ah yeah, the output was just echo
Adding export PROMPT_COMMAND="__zoxide_hook;echo"
after zoxide init
in my config file fixed it.
from zoxide.
Ah yeah, the output was just
echo
That typically means something is running after zoxide init
and overriding your PROMPT_COMMAND
. You can use set -x
in your .bashrc
to debug this.
from zoxide.
Related Issues (20)
- 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
- Feature Request: Automatic Backup and Recovery for db.zo HOT 6
- 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 5
- zoxide: no match found
- Error: zoxide has not yet been packaged for your architecture
- Directory Color Issues in Interactive Mode HOT 2
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.