The Mutt E-Mail Client : Advanced Usage : Compressed folders Support (OPTIONAL) : Open a compressed mailbox for reading
Previous: Compressed folders Support (OPTIONAL)
Next: Write a compressed mailbox

## 4.14.1. Open a compressed mailbox for reading

Usage: `open-hook` regexp "command"

The command is the command that can be used for opening the folders whose names match regexp.

The command string is the printf-like format string, and it should accept two parameters: %f, which is replaced with the (compressed) folder name, and %t which is replaced with the name of the temporary folder to which to write.

%f and %t can be repeated any number of times in the command string, and all of the entries are replaced with the appropriate folder name. In addition, %% is replaced by %, as in printf, and any other %anything is left as is.

The command should not remove the original compressed file. The command should return non-zero exit status if it fails, so mutt knows something's wrong.

Example:

> `

>     open-hook \\.gz$ "gzip -cd %f > %t"

> `

If the command is empty, this operation is disabled for this file type.

The Mutt E-Mail Client : Advanced Usage : Compressed folders Support (OPTIONAL) : Open a compressed mailbox for reading
Previous: Compressed folders Support (OPTIONAL)
Next: Write a compressed mailbox