From c600c30e22d7e6a3da903869805513e63203aac6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 19 Dec 2023 20:26:32 +0000 Subject: [PATCH] Revert "Use zoxide to provide paths to fzf" This reverts commit 54fdbd71d9e77b03b3b2322b16f6ed51f3d4a8ea. --- bin/t | 8 +++++++- system/shared/home-manager.nix | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/t b/bin/t index 6adb3ed..f4dd27f 100755 --- a/bin/t +++ b/bin/t @@ -1,12 +1,18 @@ #!/usr/bin/env bash +# Credit to ThePrimeagen. + set -o nounset set -o pipefail if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(zoxide query -l | grep -v /tmp | grep -v "^${HOME}/\." | grep -v "^${HOME}/Code$" | grep -v "/main$" | fzf --reverse) + # Get the session name from fuzzy-finding list of directories and generating a + # tmux-safe version. + items=$(find ~/Code -mindepth 3 -maxdepth 3 -type d ! -name .git) + + selected=$(echo "${items}" | sort | fzf --reverse) fi if [[ -z "${selected}" ]]; then diff --git a/system/shared/home-manager.nix b/system/shared/home-manager.nix index 880e0b4..b43ff56 100644 --- a/system/shared/home-manager.nix +++ b/system/shared/home-manager.nix @@ -31,11 +31,6 @@ nix-direnv.enable = true; }; - programs.zoxide = { - enable = true; - enableZshIntegration = true; - }; - home.sessionPath = [ "$HOME/.config/bin" ]; programs.ripgrep = {