autoload -U zsh-mime-setup ; zsh-mime-setup
+
+mime_compressed_handler() {
+ local tmp=`mktemp -t zsh-mime`
+ mv $tmp $tmp.$1:r:e
+ tmp=$tmp.$1:r:e
+ case $1:e in
+ (bz2) bunzip2 < $1 > $tmp ;;
+ (gz) gunzip < $1 > $tmp ;;
+ (xz) unxz < $1 > $tmp ;;
+ (zst) unzstd < $1 > $tmp ;;
+ (*) exit 1 ;;
+ esac
+ zsh-mime-handler $tmp
+}
+
+alias -s bz2=mime_compressed_handler
+alias -s gz=mime_compressed_handler
+alias -s xz=mime_compressed_handler
+alias -s zst=mime_compressed_handler
+
alias -s html=lynx