Variable: dired-guess-shell-gnutar

dired-guess-shell-gnutar is a customizable variable defined in dired.el.gz.

Value

"tar"

Documentation

If non-nil, name of GNU tar executable.

(E.g., "tar" or "gtar"). The z switch will be used with it for
compressed or gzip'ed tar files. If you don't have GNU tar, set this to nil: a pipe using zcat or gunzip -c will be used.

This variable was added, or its default value changed, in Emacs 29.1.

Source Code

;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defcustom dired-guess-shell-gnutar
  (catch 'found
    (dolist (exe '("tar" "gtar"))
      (if (with-temp-buffer
            (ignore-errors (call-process exe nil t nil "--version"))
            (and (re-search-backward "GNU tar" nil t) t))
          (throw 'found exe))))
  "If non-nil, name of GNU tar executable.
\(E.g., \"tar\" or \"gtar\").  The `z' switch will be used with it for
compressed or gzip'ed tar files.  If you don't have GNU tar, set this
to nil: a pipe using `zcat' or `gunzip -c' will be used."
  ;; Changed from system-type test to testing --version output.
  ;; Maybe test --help for -z instead?
  :group 'dired-guess
  :type '(choice (const :tag "Not GNU tar" nil)
                 (string :tag "Command name"))
  :version "29.1")