Open synic opened 1 year ago
Just a note, I tried it with oh-my-zsh, and it works, so there must be some configuration option I'm missing?
Well sorry for being late to the party, But I have the same "bug" (behavior), it was strange at first, but after reading some of the code I was able of figure it out.
This behavior has nothing to do with the repo itself, wd works perfectly, the issue comes with the plugin manager, in my case "zinit"
The problem is the context in which "shell" runs the script, the subshell is changing the path , but it has its own environment, so it changes the directory and finishes, but it isn't carrying the proper environment so it changes, but not for the main prompt.
That said, you can simply define the function again after the script loads, as indicated by install.sh in line 38
echo "Adding wd function to your ~/.zshrc..."
echo "wd() {" >> $ZSHRC
echo " . $DIR/wd.sh" >> $ZSHRC
echo "}"
You can do it this way after loading the script
wd(){
. /path/to/wd.sh #there is a space to source it in the current enviroment
}
I solved it in a dirty way (coz im learning about zinit lol) and simple source it wd.plugin.zsh if anyone was wondering how
zinit ice as"program" \
cp"wd.sh -> wd" mv"_wd.sh -> _wd" \
src"wd.plugin.zsh"
zinit light mfaerevaag/wd
I'd be happy to review & merge a PR for new or updated installation steps for zinit/zplug. Especially since we already document how to install zplug, if that method no longer works, then that should be updated or removed
Describe the bug Typing
wd <bookmarkname>
doesn't actually change directories. Everything seems like it's going to work, but the most important part doesn't seem to do anything.To Reproduce Steps to reproduce the behavior:
wd add test
wd list
to verify that it created your bookmark and that it points to the correct directory.cd ~/
to go to your home directory.wd test
.Expected behavior It should go to the directory you bookmarked
Actual behavior You are still in your home directory. No errors are printed. Nothing happened.
Desktop (please complete the following information):
zsh 5.9 (arm-apple-darwin22.1.0)
wd version 0.5.0
Additional context It doesn't seem to matter if I am using the version of zsh that comes with MacOS, or the version that is installed with homebrew, it doesn't work for either one.