Revert "Use zoxide to provide paths to fzf"
This reverts commit 54fdbd71d9
.
This commit is contained in:
parent
7832d6b0b6
commit
c600c30e22
2 changed files with 7 additions and 6 deletions
bin
8
bin/t
8
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue