environment/bin/index

17 lines
516 B
Text
Raw Normal View History

2025-08-03 20:53:36 +02:00
#!/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"