Handle attributes and self-closing tags
This commit is contained in:
@@ -162,16 +162,6 @@ process_command() {
|
||||
output_abs_path=$(realpath -m "$output_file")
|
||||
output_rel_path=$(realpath --relative-to=. "$output_abs_path")
|
||||
|
||||
# Generate directory tree
|
||||
{
|
||||
echo "Directory Tree:"
|
||||
if command -v tree &>/dev/null; then
|
||||
tree -a -I '.git' .
|
||||
else
|
||||
find . -name .git -prune -o -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
||||
fi
|
||||
} > "$output_file"
|
||||
|
||||
# Process directories and collect files
|
||||
declare -a all_files=()
|
||||
|
||||
@@ -262,7 +252,7 @@ process_command() {
|
||||
|
||||
# Append file contents to output
|
||||
{
|
||||
echo -e "\n\nFile Contents:"
|
||||
echo -e "File Contents:"
|
||||
for file in "${unique_files[@]}"; do
|
||||
if [[ -L "$file" ]]; then
|
||||
target=$(readlink -f "$file" || echo "unknown")
|
||||
@@ -272,7 +262,7 @@ process_command() {
|
||||
cat "$file" 2>/dev/null || echo "Error: Unable to read file"
|
||||
fi
|
||||
done
|
||||
} >> "$output_file"
|
||||
} > "$output_file"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user