Variable: dired-compress-file-suffixes

dired-compress-file-suffixes is a variable defined in dired-aux.el.gz.

Value

(("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xf -")
 ("\\.tar\\.xz\\'" "" "xz -dc %i | tar -xf -")
 ("\\.tgz\\'" "" "gzip -dc %i | tar -xf -") ("\\.gz\\'" "" "gzip -d")
 ("\\.lz\\'" "" "lzip -d") ("\\.Z\\'" "" "uncompress")
 ("\\.z\\'" "" "gzip -d") ("\\.dz\\'" "" "dictunzip")
 ("\\.tbz\\'" ".tar" "bunzip2") ("\\.bz2\\'" "" "bunzip2")
 ("\\.xz\\'" "" "unxz") ("\\.zip\\'" "" "unzip -o -d %o %i")
 ("\\.tar\\.zst\\'" "" "unzstd -c %i | tar -xf -")
 ("\\.tzst\\'" "" "unzstd -c %i | tar -xf -")
 ("\\.zst\\'" "" "unzstd --rm") ("\\.7z\\'" "" "7z x -aoa -o%o %i")
 ("\\.tar\\'" ".tgz" nil))

Documentation

Control changes in file name suffixes for compression and uncompression.

Each element specifies one transformation rule, and has the form:
  (REGEXP NEW-SUFFIX PROGRAM)
The rule applies when the old file name matches REGEXP. The new file name is computed by deleting the part that matches REGEXP
 (as well as anything after that), then adding NEW-SUFFIX in its place.
If PROGRAM is non-nil, the rule is an uncompression rule, and uncompression is done by running PROGRAM.

Within PROGRAM, %i denotes the input file, and %o denotes the output file.

Otherwise, the rule is a compression rule, and compression is done with gzip. ARGS are command switches passed to PROGRAM.

Source Code

;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
(defvar dired-compress-file-suffixes
  '(
    ;; "tar -zxf" isn't used because it's not available on the
    ;; Solaris 10 version of tar (obsolete in 2024?).
    ;; Same thing on AIX 7.1 (obsolete 2023?) and 7.2 (obsolete 2022?).
    ("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xf -")
    ("\\.tar\\.xz\\'" "" "xz -dc %i | tar -xf -")
    ("\\.tgz\\'" "" "gzip -dc %i | tar -xf -")
    ("\\.gz\\'" "" "gzip -d")
    ("\\.lz\\'" "" "lzip -d")
    ("\\.Z\\'" "" "uncompress")
    ;; For .z, try gunzip.  It might be an old gzip file,
    ;; or it might be from compact? pack? (which?) but gunzip handles both.
    ("\\.z\\'" "" "gzip -d")
    ("\\.dz\\'" "" "dictunzip")
    ("\\.tbz\\'" ".tar" "bunzip2")
    ("\\.bz2\\'" "" "bunzip2")
    ("\\.xz\\'" "" "unxz")
    ("\\.zip\\'" "" "unzip -o -d %o %i")
    ("\\.tar\\.zst\\'" "" "unzstd -c %i | tar -xf -")
    ("\\.tzst\\'" "" "unzstd -c %i | tar -xf -")
    ("\\.zst\\'" "" "unzstd --rm")
    ("\\.7z\\'" "" "7z x -aoa -o%o %i")
    ;; This item controls naming for compression.
    ("\\.tar\\'" ".tgz" nil))
  "Control changes in file name suffixes for compression and uncompression.
Each element specifies one transformation rule, and has the form:
  (REGEXP NEW-SUFFIX PROGRAM)
The rule applies when the old file name matches REGEXP.
The new file name is computed by deleting the part that matches REGEXP
 (as well as anything after that), then adding NEW-SUFFIX in its place.
If PROGRAM is non-nil, the rule is an uncompression rule,
and uncompression is done by running PROGRAM.

Within PROGRAM, %i denotes the input file, and %o denotes the
output file.

Otherwise, the rule is a compression rule, and compression is done with gzip.
ARGS are command switches passed to PROGRAM.")