Function: vi-shell-op
vi-shell-op is a byte-compiled function defined in vi.el.gz.
Signature
(vi-shell-op MOTION-COMMAND ARG &optional SHELL-COMMAND)
Documentation
Perform shell command (as filter).
Performs command on range specified by MOTION-COMMAND with ARG. If SHELL-COMMAND is not given, ask for one from minibuffer. If char argument is given, it directs the output to a *temp* buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vi.el.gz
(defun vi-shell-op (motion-command arg &optional shell-command)
"Perform shell command (as filter).
Performs command on range specified by MOTION-COMMAND
with ARG. If SHELL-COMMAND is not given, ask for one from minibuffer.
If char argument is given, it directs the output to a *temp* buffer."
(let* ((range (vi-effective-range motion-command arg))
(begin (car range)) (end (cdr range)))
(if (= begin end)
nil ; point not moved, abort op
(cond ((null shell-command)
(setq shell-command (read-string "!" nil))
(setq vi-last-shell-command shell-command)))
(shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg))
(not (vi-prefix-char-value arg)))
t)))