Hi,
I copied the autojump and created a shellscript. I installed zoxide and added its variable to the PATH. assigned NNN_PIPE=zoxide in bash file. When I invoke with shortcut it says zoxide not found. I copied zoxide in usr/bin/ and tried. what am i doing wrong?
It’s a plugin, so you have to install it from the AUR first.
https://aur.archlinux.org/packages/zoxide-git
How did you install it? Add to PATH? If you had installed from the aur, you don’t have to add its location to PATH. The executable will be placed inside /usr/bin
Likely because you haven’t installed it.
Using git clone and added the export variable in bashrc file at the very end …
Cloning its repository is not the same as installation.
You can just install zoxide
from the arch repo
sudo pacman -S zoxide
Or zoxide-git
from the AUR if you prefer the dev version.
After the installation, add
eval "$(zoxide init bash)"
to your .bashrc
Installed using pacman now … added eval line to bashrc … but still no change …
Did you add
eval "$(zoxide init bash)"
to your .bashrc
and then restart your terminal?
yep. Did that now. Still the same
Post the error messages.
Forget to tell you I ran the following command while trying to fix it
sudo cp /home/username/.local/bin/zoxide /usr/bin/env
Thats what causing the issue I guess.
This is bad news, pal… What this does is that it replaces the /usr/bin/env
(a core program in any linux system) binary with the zoxide
executable you just cloned. The /usr/bin/env
is a very important program required by many applications. Please don’t be careless with sudo
commands.
Please reinstall the coreutils
package.
sudo pacman -S coreutils
Hopefully, that will bring back the original /usr/bin/env
executable.
omg !! 1min i’ll install coreutils
It will tell you that the package is already installed. Just reinstall it anyway.
Reinstalled coreutils …
Can you run man env
and take a screenshot? Just to make sure that /usr/bin/env
is back to the way it was.
Good. So that’s one problem dealt with.
Can you post the output of
ls -a ~/.config/nnn/plugins
Post the contents of the autojump
directory.
ls -a ~/.config/nnn/plugins/autojump
Also post all the NNN environment variables that are currently set.
printenv | grep "^NNN"