#!/bin/bash # find $NOTES_DIR/gpt -type d -path "$NOTES_DIR/gpt/[0-9][0-9]-[0-9][0-9]-[0-9][0-9]/*" | while read -r path; do # echo $(basename "$path") # done | sort -u | fzf SEARCH_DIR="$NOTES_DIR/gpt" DELIMITER="|" selected=$(find "$SEARCH_DIR" -type d -path "$SEARCH_DIR/[0-9][0-9]-[0-9][0-9]-[0-9][0-9]/*" | while read -r path; do topic=$(basename "$path") echo -e "$topic\t$path" done | fzf --delimiter='\t' --with-nth=1) selected_path=$(echo "$selected" | cut -f2) echo "Path: $selected_path"