diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 47e97c96ce1..320afa48bfe 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1290,7 +1290,8 @@ dired-guess-default nil))))) (if (length= programs 1) (car programs) - programs))) + (or programs + dired-guess-shell-default)))) ;;;###autoload (defun dired-guess-shell-command (prompt files) diff --git a/lisp/dired.el b/lisp/dired.el index 97645c731c8..eeea88fdae9 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -468,6 +468,18 @@ dired-guess-shell-alist-user :type '(alist :key-type regexp :value-type (repeat sexp)) :version "29.1") +(defcustom dired-guess-shell-default + (cond ((memq system-type '(gnu/linux darwin)) + "open") + ((memq system-type '(windows-nt ms-dos)) + "start")) + "The fall-back command when nothing specific is found. +Used when neither `dired-guess-shell-alist-user' nor +`dired-guess-shell-alist-default' supply anything." + :group 'dired-guess + :type 'string + :version "30.1") + (defcustom dired-guess-shell-gnutar (catch 'found (dolist (exe '("tar" "gtar"))