Last active
December 23, 2024 18:04
-
-
Save agritheory/b0513d723c099a254326248ef37b788e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clip-claude() { | |
local base_dir="${1:-.}" # Use current directory if no directory specified | |
local pattern="${2:-*/*.ts}" # Default to */*.ts if no pattern specified | |
( | |
find "$base_dir" -type f -name "$pattern" | sort | while read -r file; do | |
echo "// File: $file" | |
cat "$file" 2>/dev/null || echo "File not found: $file" | |
done | |
) | clip.exe | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use default (current dir, /.ts)
Specify a different directory
Specify a custom pattern
Fully specified