From aa3e41050a4c2789368cb1d5fba1037c53e570c5 Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Sun, 18 Oct 2020 22:17:37 -0400 Subject: [PATCH] Z --- playbooks/roles/rust/tasks/main.yml | 7 +++++++ zsh/funcs/zoxide | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 zsh/funcs/zoxide diff --git a/playbooks/roles/rust/tasks/main.yml b/playbooks/roles/rust/tasks/main.yml index f30b93b..b225c7d 100644 --- a/playbooks/roles/rust/tasks/main.yml +++ b/playbooks/roles/rust/tasks/main.yml @@ -104,3 +104,10 @@ creates: ~/.cargo/bin/silicon when: - rust_extras == true + +- name: Install zoxide + shell: ~/.cargo/bin/cargo install zoxide + args: + creates: ~/.cargo/bin/zoxide + when: + - rust_extras == true diff --git a/zsh/funcs/zoxide b/zsh/funcs/zoxide new file mode 100644 index 0000000..a1eafa8 --- /dev/null +++ b/zsh/funcs/zoxide @@ -0,0 +1,4 @@ +if [[ -x ~/.cargo/bin/zoxide ]]; then + eval "$(zoxide init zsh)" + alias cd='z' +fi