@@ -177,9 +177,11 @@ copy_dir_llm_style () {
echo "Here is the contents of \`$(basename "$PWD")/\`:\n";
git ls-files -z |
while IFS= read -r -d $'\0' f; do
- echo "$f"; echo '```';
- cat "$f"; echo '```';
- echo;
+ if [[ "$(file -b --mime-type "$f")" == "text/"* ]]; then
+ echo "$f"; echo '```';
+ cat "$f"; echo '```';
+ echo;
+ fi
done;
} | pbcopy
echo "\nCopied!"