(defvar last-shell-command "")
(defvar last-shell-command-on-region "")
+(defvar shell-command-history nil
+ "History list for some commands that read shell commands.")
+
(defun shell-command (command &optional flag)
"Execute string COMMAND in inferior shell; display output, if any.
If COMMAND ends in ampersand, execute it asynchronously.
means insert output in current buffer after point (leave mark after it).
This cannot be done asynchronously."
(interactive (list (read-string "Shell command: " last-shell-command)
- current-prefix-arg))
+ current-prefix-arg nil nil 'shell-command-history))
(if flag
(progn (barf-if-buffer-read-only)
(push-mark)
deleted."
(interactive (list (region-beginning) (region-end)
(read-string "Shell command on region: "
- last-shell-command-on-region)
+ last-shell-command-on-region
+ nil nil 'shell-command-history)
current-prefix-arg
(prefix-numeric-value current-prefix-arg)))
(if flag