4 added one-liner tar.gz ..
source | link

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo "$zip_file" ; unzip -l "$zip_file" | \
 grep -i --color=always -R "$to_srch"; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' \)) | \
 less -oR

and for tar ( this one is untested ... )

 while read -r tar_file ; do echo "$tar_file" ; tar -tf  "$tar_file" | \
 grep -i --color=always -R "$to_srch"; \
 done < <(find . \( -name '*.tar.gz' -o -name '*.tar' \)) | \
 less -R

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo "$zip_file" ; unzip -l "$zip_file" | \
 grep -i --color=always -R "$to_srch"; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' -o -name '*.tar.gz' \)) | \
 less -R

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo "$zip_file" ; unzip -l "$zip_file" | \
 grep -i --color=always -R "$to_srch"; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' \)) | \
 less -R

and for tar ( this one is untested ... )

 while read -r tar_file ; do echo "$tar_file" ; tar -tf  "$tar_file" | \
 grep -i --color=always -R "$to_srch"; \
 done < <(find . \( -name '*.tar.gz' -o -name '*.tar' \)) | \
 less -R
3 added quotes around vars ...
source | link

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo $zip_file"$zip_file" ; unzip -l $zip_file"$zip_file" | \
 grep -i --color=always -R $to_srch;"$to_srch"; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' -o -name '*.tar.gz' \)) | \
 less -R

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo $zip_file ; unzip -l $zip_file | \
 grep -i --color=always -R $to_srch; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' -o -name '*.tar.gz' \)) | \
 less -R

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo "$zip_file" ; unzip -l "$zip_file" | \
 grep -i --color=always -R "$to_srch"; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' -o -name '*.tar.gz' \)) | \
 less -R
2 improved formatting
source | link

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo $zip_file ; \
 unzip -l $zip_file | \
 grep -i --color=always -R $to_srch; \
 done < <(find . \( -name '*.7z' -o -name '*.tar.gz'zip' -o -name '*.tgz'tar.gz' \)) | \
 | less -R

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo $zip_file ; \
 unzip -l $zip_file | grep -i --color=always -R $to_srch; \
 done < <(find . \( -name '*.7z' -o -name '*.tar.gz' -o -name '*.tgz' \)) \
 | less -R

IMHO user-friendliness should be a thing in bash as well :

 while read -r zip_file ; do echo $zip_file ; unzip -l $zip_file | \
 grep -i --color=always -R $to_srch; \
 done < <(find . \( -name '*.7z' -o -name '*.zip' -o -name '*.tar.gz' \)) | \
 less -R
1
source | link