feat: add and use zoxide

This commit is contained in:
Oliver Davies 2022-10-12 07:59:47 +01:00
parent f7df88b616
commit 7cfdca5a06
3 changed files with 13 additions and 8 deletions

View file

@ -11,7 +11,7 @@ if [[ $# -eq 1 ]]; then
else
# Get the session name from fuzzy-finding list of directories and generating a
# tmux-safe version.
selected=$(find ~/ ~/Code ~/Code/clients ~/Code/os ~/Code/Personal ~/Documents/Books ~/Documents/Talks/ -mindepth 1 -maxdepth 1 -type d -not -name ".*" | sort | fzf)
selected=$(zoxide query -l | sort | fzf --reverse)
fi
if [[ -z $selected ]]; then

View file

@ -28,6 +28,7 @@
tree
unzip
wget
zoxide
# LSP
# TODO: nodePackages."@ansible/ansible-language-server"
@ -116,6 +117,15 @@
];
};
home.sessionPath = [
"$HOME/.config/bin"
];
xdg.configFile.bin = {
source = ../../../bin;
recursive = true;
};
xdg.configFile.nvim = {
source = ../../../config/neovim;
recursive = true;

View file

@ -13,18 +13,13 @@
update = "fetch && rebase";
};
autocd = true;
cdpath = [
"$HOME/Code"
"$HOME/Code/*"
"$HOME"
];
initExtra = ''
if [ -f ~/.config/zsh/.p10k.zsh ]; then
. ~/.config/zsh/.p10k.zsh
fi
eval "$(zoxide init zsh)"
# Case insensitive autocompletion.
zstyle ":completion:*" matcher-list "" "m:{a-zA-Z}={A-Za-z}" "r:|=*" "l:|=* r:|=*"
autoload -Uz compinit && compinit