fix regex

This commit is contained in:
snailed 2022-10-21 19:25:14 +00:00 committed by GitHub
parent e9097515ce
commit 1af6a0ab3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ list() {
for file in "$1"/*; do for file in "$1"/*; do
[ "$(head -1 "$file")" = "[Trash Info]" ] && \ [ "$(head -1 "$file")" = "[Trash Info]" ] && \
fpath=$(grep Path "$file" | cut -d '=' -f2) && \ fpath=$(grep Path "$file" | cut -d '=' -f2) && \
echo "$fpath" | grep -qP "^$2" && \ echo "$fpath" | grep -qP "^$2/[^/]+$" && \
printf "%s %s %s\n" \ printf "%s %s %s\n" \
"$(basename "$file")" \ "$(basename "$file")" \
"$fpath" \ "$fpath" \