mycommands: convert to printf

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-01-02 23:10:02 +01:00
parent f95e21428c
commit 9acb2cd7f4
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@
# #### mycommands.clean # #### mycommands.clean
# #
# shellcheck disable=SC1117 # shellcheck disable=SC1117
#### $$VERSION$$ v1.20-0-g2ab00a2 #### $$VERSION$$ v1.21-pre-40-gf95e214
# #
# uncomment the following lines to overwrite info and help messages # uncomment the following lines to overwrite info and help messages
@ -264,7 +264,7 @@ else
local avatar=("https://avatars.githubusercontent.com/u/13046303" "https://avatars.githubusercontent.com/u/4593242" "https://avatars.githubusercontent.com/u/102707" "https://avatars.githubusercontent.com/u/6460407") local avatar=("https://avatars.githubusercontent.com/u/13046303" "https://avatars.githubusercontent.com/u/4593242" "https://avatars.githubusercontent.com/u/102707" "https://avatars.githubusercontent.com/u/6460407")
answer_inline_multi "${iQUERY[ID]}" " answer_inline_multi "${iQUERY[ID]}" "
$(for photo in ${avatar[*]} ; do $(for photo in ${avatar[*]} ; do
echo "${sep}"; inline_query_compose "$RANDOM" "photo" "${photo}" "${photo}"; sep="," printf "%s\n" "${sep}"; inline_query_compose "$RANDOM" "photo" "${photo}" "${photo}"; sep=","
done) done)
" "
;; ;;
@ -306,7 +306,7 @@ else
[ "$count" -gt "20" ] && break [ "$count" -gt "20" ] && break
image="${image#* src=\'}"; image="${image%%&pid=*}" image="${image#* src=\'}"; image="${image%%&pid=*}"
[[ "${image}" = *"src="* ]] && continue [[ "${image}" = *"src="* ]] && continue
echo "${sep}"; inline_query_compose "$RANDOM" "photo" "${image}"; sep="," printf "%s\n" "${sep}"; inline_query_compose "$RANDOM" "photo" "${image}"; sep=","
count=$(( count + 1 )) count=$(( count + 1 ))
done <<<"${result}" done <<<"${result}"
} }

View File

@ -4,7 +4,7 @@
# files: mycommands.sh.clean # files: mycommands.sh.clean
# copy to mycommands.sh and add all your commands and functions here ... # copy to mycommands.sh and add all your commands and functions here ...
# #
#### $$VERSION$$ v1.20-0-g2ab00a2 #### $$VERSION$$ v1.21-pre-40-gf95e214
# #
########## ##########
@ -141,7 +141,7 @@ else
[ "$count" -gt "20" ] && break [ "$count" -gt "20" ] && break
image="${image#* src=\'}"; image="${image%%&pid=*}" image="${image#* src=\'}"; image="${image%%&pid=*}"
[[ "${image}" = *"src="* ]] && continue [[ "${image}" = *"src="* ]] && continue
echo "${sep}"; inline_query_compose "$RANDOM" "photo" "${image}"; sep="," printf "%s\n" "${sep}"; inline_query_compose "$RANDOM" "photo" "${image}"; sep=","
count=$(( count + 1 )) count=$(( count + 1 ))
done <<<"${result}" done <<<"${result}"
} }