Merge pull request #702 from jaresty/add-find-prompt-utility

Add find prompt utility
This commit is contained in:
Fatih Kadir Akın 2023-11-09 20:35:14 +03:00 committed by GitHub
commit cdd8681c07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
scripts/find-prompt Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
curl -s https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv | tail +2 | ruby -rcsv -e 'CSV.parse(STDIN.read) {|row| puts row.join("\t")}' | fzf -1 -q "$1" --with-nth 1 --delimiter "\t" --preview 'echo {2} | fold -s -w $(tput cols)' | cut -d" " -f2