save
This commit is contained in:
parent
7360824eab
commit
368ebfaba2
6 changed files with 147 additions and 0 deletions
16
bin/index
Executable file
16
bin/index
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/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"
|
Loading…
Add table
Add a link
Reference in a new issue