                                                       (list (buffer-name proc-buffer) proc-buffer)
                                                       (or shell-util '("zsh"))
                                                       (or shell-args '("-x" "-c"))
-                                                      (list script))))
+                                                      (if shell-pipe
+                                                          (list (format "echo '%s' | %s" script shell-pipe))
+                                                        (list script)))))
     (setq progress-reporter (make-progress-reporter (process-name proc)))
     (progress-reporter-update progress-reporter)
     (if (equal (process-status proc) 'exit)

(defun dwim-shell-command ()
  "Execute DWIM shell command."
  (interactive)
  (dwim-shell-command--on-marked-files
   "DWIM shell command" (read-shell-command "DWIM shell command: ")))

(cl-defun dwim-shell-command-execute-script (buffer-name script &key files extensions shell-util shell-args utils post-process-template on-completion)
  "Execute SCRIPT, with BUFFER-NAME."
  (cl-assert buffer-name nil "Script must have a buffer name")
  (cl-assert (not (string-empty-p script)) nil "Script must not be empty")

(defun dwim-shell-command-unzip ()
  "Unzip all marked archives (of any kind) using `atool'."
  (interactive)
  (dwim-shell-command-on-marked-files
   "Unzip" "atool --extract --explain <<f>>"
   :utils "atool"))

