Variable: dired-guess-shell-alist-default

dired-guess-shell-alist-default is a variable defined in dired-aux.el.gz.

Value

Large value
(("\\.tar\\'"
  (if dired-guess-shell-gnutar
      (concat dired-guess-shell-gnutar " xvf")
    "tar xvf")
  (if dired-guess-shell-gnutar
      (concat "mkdir " (file-name-sans-extension file) "; "
	      dired-guess-shell-gnutar " -C "
	      (file-name-sans-extension file) " -xvf")
    (concat "mkdir " (file-name-sans-extension file) "; tar -C "
	    (file-name-sans-extension file) " -xvf"))
  (if dired-guess-shell-gnutar
      (concat dired-guess-shell-gnutar " tvf")
    "tar tvf"))
 ("\\.tar\\.Z\\'"
  (if dired-guess-shell-gnutar
      (concat dired-guess-shell-gnutar " zxvf")
    (concat "zcat * | tar xvf -"))
  (concat "znew" (if dired-guess-shell-gzip-quiet " -q") " "
	  dired-guess-shell-znew-switches))
 ("\\.t\\(ar\\.\\)?gz\\'"
  (if dired-guess-shell-gnutar
      (concat dired-guess-shell-gnutar " zxvf")
    (concat "gunzip -qc * | tar xvf -"))
  (if dired-guess-shell-gnutar
      (concat "mkdir " (file-name-sans-extension file) "; "
	      dired-guess-shell-gnutar " -C "
	      (file-name-sans-extension file) " -zxvf")
    (concat "mkdir " (file-name-sans-extension file)
	    "; gunzip -qc * | tar -C " (file-name-sans-extension file)
	    " -xvf -"))
  (concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))
  (if dired-guess-shell-gnutar
      (concat dired-guess-shell-gnutar " ztvf")
    (concat "gunzip -qc * | tar tvf -")))
 ("\\.t\\(ar\\.bz2\\|bz\\)\\'" "bunzip2 -c * | tar xvf -"
  (concat "mkdir " (file-name-sans-extension file)
	  "; bunzip2 -c * | tar -C " (file-name-sans-extension file)
	  " -xvf -")
  "bunzip2")
 ("\\.t\\(ar\\.\\)?xz\\'" "unxz -c * | tar xvf -"
  (concat "mkdir " (file-name-sans-extension file)
	  "; unxz -c * | tar -C " (file-name-sans-extension file)
	  " -xvf -")
  "unxz")
 ("\\(?:\\.t\\(?:\\(?:ar\\.\\)?zst\\)\\)\\'" "unzstd -c ? | tar -xf -")
 ("\\.zst\\'" "unzstd --rm") ("\\.shar\\.Z\\'" "zcat * | unshar")
 ("\\.shar\\.g?z\\'" "gunzip -qc * | unshar")
 ("\\.e?ps\\'" "ghostview" "xloadimage" "lpr")
 ("\\.e?ps\\.g?z\\'" "gunzip -qc * | ghostview -"
  (concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
 ("\\.e?ps\\.Z\\'" "zcat * | ghostview -"
  (concat "znew" (if dired-guess-shell-gzip-quiet " -q") " "
	  dired-guess-shell-znew-switches))
 ("\\.patch\\'"
  (if
      (eq (ignore-errors (vc-responsible-backend default-directory))
	  'Git)
      "cat * | git apply"
    "cat * | patch"))
 ("\\.patch\\.g?z\\'" "gunzip -qc * | patch"
  (concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
 ("\\.patch\\.Z\\'" "zcat * | patch"
  (concat "znew" (if dired-guess-shell-gzip-quiet " -q") " "
	  dired-guess-shell-znew-switches))
 ("\\.\\(?:[0-9]\\|man\\)\\'"
  (let ((loc (Man-support-local-filenames)))
    (cond ((eq loc 'man-db) "man -l") ((eq loc 'man) "man ./")
	  (t "cat * | tbl | nroff -man -h | col -b"))))
 ("\\.\\(?:[0-9]\\|man\\)\\.g?z\\'"
  (let ((loc (Man-support-local-filenames)))
    (cond ((eq loc 'man-db) "man -l") ((eq loc 'man) "man ./")
	  (t "gunzip -qc * | tbl | nroff -man -h | col -b")))
  (concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
 ("\\.[0-9]\\.Z\\'"
  (let ((loc (Man-support-local-filenames)))
    (cond ((eq loc 'man-db) "man -l") ((eq loc 'man) "man ./")
	  (t "zcat * | tbl | nroff -man -h | col -b")))
  (concat "znew" (if dired-guess-shell-gzip-quiet " -q") " "
	  dired-guess-shell-znew-switches))
 ("\\.pod\\'" "perldoc" "pod2man * | nroff -man")
 ("\\.uu\\'" "uudecode") ("\\.sh\\'" "sh") ("\\.tex\\'" "latex" "tex")
 ("\\.texi\\(nfo\\)?\\'" "makeinfo" "texi2dvi")
 ("\\.rpm\\'" "rpm -qilp" "rpm -ivh") ("\\.dia\\'" "dia")
 ("\\.mgp\\'" "mgp")
 ("\\.zip\\'" "unzip" "unzip -l"
  (concat "unzip" (if dired-guess-shell-gzip-quiet " -q") " -d "
	  (file-name-sans-extension file)))
 ("\\.zoo\\'" "zoo x//") ("\\.lzh\\'" "lharc x") ("\\.arc\\'" "arc x")
 ("\\.shar\\'" "unshar") ("\\.rar\\'" "unrar x") ("\\.7z\\'" "7z x")
 ("\\.g?z\\'"
  (concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
 ("\\.dz\\'" "dictunzip") ("\\.bz2\\'" "bunzip2") ("\\.xz\\'" "unxz")
 ("\\.Z\\'" "uncompress"
  (concat "znew" (if dired-guess-shell-gzip-quiet " -q") " "
	  dired-guess-shell-znew-switches))
 ("\\.sign?\\'" "gpg --verify"))

Documentation

Default alist used for shell command guessing.

See also dired-guess-shell-alist-optional and dired-guess-shell-alist-user.

View in manual

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
(defvar dired-guess-shell-alist-default
  (list
   (list "\\.tar\\'"
         '(if dired-guess-shell-gnutar
              (concat dired-guess-shell-gnutar " xvf")
            "tar xvf")
         ;; Extract files into a separate subdirectory
         '(if dired-guess-shell-gnutar
              (concat "mkdir " (file-name-sans-extension file)
                      "; " dired-guess-shell-gnutar " -C "
                      (file-name-sans-extension file) " -xvf")
            (concat "mkdir " (file-name-sans-extension file)
                    "; tar -C " (file-name-sans-extension file) " -xvf"))
         ;; List archive contents.
         '(if dired-guess-shell-gnutar
              (concat dired-guess-shell-gnutar " tvf")
            "tar tvf"))

   ;; REGEXPS for compressed archives must come before the .Z rule to
   ;; be recognized:
   (list "\\.tar\\.Z\\'"
         ;; Untar it.
         '(if dired-guess-shell-gnutar
              (concat dired-guess-shell-gnutar " zxvf")
            (concat "zcat * | tar xvf -"))
         ;; Optional conversion to gzip format.
         '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
                  " " dired-guess-shell-znew-switches))

   ;; gzip'ed archives
   (list "\\.t\\(ar\\.\\)?gz\\'"
         '(if dired-guess-shell-gnutar
              (concat dired-guess-shell-gnutar " zxvf")
            (concat "gunzip -qc * | tar xvf -"))
         ;; Extract files into a separate subdirectory
         '(if dired-guess-shell-gnutar
              (concat "mkdir " (file-name-sans-extension file)
                      "; " dired-guess-shell-gnutar " -C "
                      (file-name-sans-extension file) " -zxvf")
            (concat "mkdir " (file-name-sans-extension file)
                    "; gunzip -qc * | tar -C "
                    (file-name-sans-extension file) " -xvf -"))
         ;; Optional decompression.
         '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))
         ;; List archive contents.
         '(if dired-guess-shell-gnutar
              (concat dired-guess-shell-gnutar " ztvf")
            (concat "gunzip -qc * | tar tvf -")))

   ;; bzip2'ed archives
   (list "\\.t\\(ar\\.bz2\\|bz\\)\\'"
         "bunzip2 -c * | tar xvf -"
         ;; Extract files into a separate subdirectory
         '(concat "mkdir " (file-name-sans-extension file)
                  "; bunzip2 -c * | tar -C "
                  (file-name-sans-extension file) " -xvf -")
         ;; Optional decompression.
         "bunzip2")

   ;; xz'ed archives
   (list "\\.t\\(ar\\.\\)?xz\\'"
         "unxz -c * | tar xvf -"
         ;; Extract files into a separate subdirectory
         '(concat "mkdir " (file-name-sans-extension file)
                  "; unxz -c * | tar -C "
                  (file-name-sans-extension file) " -xvf -")
         ;; Optional decompression.
         "unxz")

   ;; zstandard archives
   `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c ? | tar -xf -")
   `(,(rx ".zst" eos)                  "unzstd --rm")

   '("\\.shar\\.Z\\'" "zcat * | unshar")
   '("\\.shar\\.g?z\\'" "gunzip -qc * | unshar")

   '("\\.e?ps\\'" "ghostview" "xloadimage" "lpr")
   (list "\\.e?ps\\.g?z\\'" "gunzip -qc * | ghostview -"
         ;; Optional decompression.
         '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
   (list "\\.e?ps\\.Z\\'" "zcat * | ghostview -"
         ;; Optional conversion to gzip format.
         '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
                  " " dired-guess-shell-znew-switches))

   (list "\\.patch\\'"
         '(if (eq (ignore-errors (vc-responsible-backend default-directory)) 'Git)
              "cat * | git apply"
            "cat * | patch"))
   (list "\\.patch\\.g?z\\'" "gunzip -qc * | patch"
         ;; Optional decompression.
         '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
   (list "\\.patch\\.Z\\'" "zcat * | patch"
         ;; Optional conversion to gzip format.
         '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
                  " " dired-guess-shell-znew-switches))

   ;; The following four extensions are useful with dired-man ("N" key)
   ;; FIXME "man ./" does not work with dired-do-shell-command,
   ;; because there seems to be no way for us to modify the filename,
   ;; only the command.  Hmph.  `dired-man' works though.
   (list "\\.\\(?:[0-9]\\|man\\)\\'"
         '(let ((loc (Man-support-local-filenames)))
            (cond ((eq loc 'man-db) "man -l")
                  ((eq loc 'man) "man ./")
                  (t
                   "cat * | tbl | nroff -man -h | col -b"))))
   (list "\\.\\(?:[0-9]\\|man\\)\\.g?z\\'"
         '(let ((loc (Man-support-local-filenames)))
            (cond ((eq loc 'man-db)
                   "man -l")
                  ((eq loc 'man)
                   "man ./")
                  (t "gunzip -qc * | tbl | nroff -man -h | col -b")))
         ;; Optional decompression.
         '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
   (list "\\.[0-9]\\.Z\\'"
         '(let ((loc (Man-support-local-filenames)))
            (cond ((eq loc 'man-db) "man -l")
                  ((eq loc 'man) "man ./")
                  (t "zcat * | tbl | nroff -man -h | col -b")))
         ;; Optional conversion to gzip format.
         '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
                  " " dired-guess-shell-znew-switches))
   '("\\.pod\\'" "perldoc" "pod2man * | nroff -man")

   '("\\.uu\\'" "uudecode")		; for uudecoded files
   '("\\.sh\\'" "sh")			; execute shell scripts
   '("\\.tex\\'" "latex" "tex")
   '("\\.texi\\(nfo\\)?\\'" "makeinfo" "texi2dvi")
   '("\\.rpm\\'" "rpm -qilp" "rpm -ivh")
   '("\\.dia\\'" "dia")
   '("\\.mgp\\'" "mgp")

   ;; Some other popular archivers.
   (list "\\.zip\\'" "unzip" "unzip -l"
         ;; Extract files into a separate subdirectory
         '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q")
                  " -d " (file-name-sans-extension file)))
   '("\\.zoo\\'" "zoo x//")
   '("\\.lzh\\'" "lharc x")
   '("\\.arc\\'" "arc x")
   '("\\.shar\\'" "unshar")
   '("\\.rar\\'" "unrar x")
   '("\\.7z\\'" "7z x")

   ;; Compression.
   (list "\\.g?z\\'" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
   (list "\\.dz\\'" "dictunzip")
   (list "\\.bz2\\'" "bunzip2")
   (list "\\.xz\\'" "unxz")
   (list "\\.Z\\'" "uncompress"
         ;; Optional conversion to gzip format.
         '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
                  " " dired-guess-shell-znew-switches))

   '("\\.sign?\\'" "gpg --verify"))
  "Default alist used for shell command guessing.
See also `dired-guess-shell-alist-optional' and
`dired-guess-shell-alist-user'.")