#!/bin/bash DIR=$(fdfind --type d --strip-cwd-prefix -L -H | fzf) SESSION_NAME="$DIR_$(date +%M%S)" if [ -n "$DIR" ] then tmux new-session -d -c "$DIR" -s "$SESSION_NAME" if [ -n "$TMUX" ] then tmux switch -t "$SESSION_NAME" else tmux attach -t "$SESSION_NAME" fi fi