I'm not a fan of the default preview for archives in Ranger, and I want to change it.
As an example, for .zip files, the preview displays the plain output of unzip -l <file>. Using custom commands however, it's possible to display a tree view of the archive (as an example, .zip files can be viewed as a tree with unzip -l <file> | awk 'FNR>3 {$1=$2=$3=""; print substr($0,4)}' | tree --fromfile.
How do I configure Ranger to preview/display the archive file with a custom shell command for each filetype (.tar.gz, .zip, .7z, etc...)?
Related: How do I get a better exploration for archives in ranger?