Update tmux-sessionizer to support a config (list of directories)

This commit is contained in:
Dave Gallant
2022-06-24 11:07:46 -04:00
parent 6a724a2ada
commit 66c22c3bc0

View File

@@ -3,10 +3,13 @@
# Credit to ThePrimeagen for this:
# https://sourcegraph.com/github.com/ThePrimeagen/.dotfiles@5cd09f06d6683b91c26822a73b40e3d7fb9af57a/-/blob/bin/.local/bin/tmux-sessionizer
readarray -t directories < ~/.config/tmux-sessionizer
if [[ $# -eq 1 ]]; then
selected=$1
else
selected=$(find ~/src/github.com/davegallant -mindepth 1 -maxdepth 1 -type d | fzf --exact)
selected=$(find "${directories[@]}" -mindepth 1 -maxdepth 1 -type d | fzf --exact)
fi
if [[ -z $selected ]]; then