fix(aliases): fix webp function

This commit is contained in:
spy4x 2024-03-17 00:20:28 +08:00
parent fd698cf4cd
commit 49f141e750

View File

@ -38,9 +38,9 @@ alias dclean="docker system prune -af"
# webp BEGIN
function to_webp() {
setopt NULL_GLOB
for type in jpg png; do
for type in jpg jpeg png; do
for F in *.$type; do
cwebp "$F" -o "`basename "$\{F%.$type}"`.webp"
cwebp "$F" -o "`basename "${F%.$type}"`.webp"
done
done
unsetopt NULL_GLOB