diff --git a/format-all.el b/format-all.el index ee3d121d..6d327ab5 100644 --- a/format-all.el +++ b/format-all.el @@ -1288,7 +1288,14 @@ Consult the existing formatters for examples of BODY." (format-all--buffer-easy executable (if (buffer-file-name) - (list "-filename" (buffer-file-name)) + (list "-filename" + (cl-case (and (eql major-mode 'sh-mode) + (boundp 'sh-shell) + (symbol-value 'sh-shell)) + (bash (concat buffer-file-name ".bash")) + (mksh (concat buffer-file-name ".mksh")) + (sh (concat buffer-file-name ".sh")) + (t buffer-file-name))) (list "-ln" (cl-case (and (eql major-mode 'sh-mode) (boundp 'sh-shell) (symbol-value 'sh-shell))