Function: eshell--do-opts
eshell--do-opts is a byte-compiled function defined in esh-opt.el.gz.
Signature
(eshell--do-opts NAME OPTIONS ARGS ORIG-ARGS)
Documentation
Helper function for eshell-eval-using-options.
This code doesn't really need to be macro expanded everywhere.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-opt.el.gz
(defun eshell--do-opts (name options args orig-args)
"Helper function for `eshell-eval-using-options'.
This code doesn't really need to be macro expanded everywhere."
(require 'esh-ext)
(declare-function eshell-external-command "esh-ext" (command args))
(let ((ext-command
(catch 'eshell-ext-command
(let ((usage-msg
(catch 'eshell-usage
(if (and (= (length args) 0)
(memq ':show-usage options))
(eshell-show-usage name options)
(setq args (eshell--process-args name args options))
nil))))
(when usage-msg
(error "%s" usage-msg))))))
(if ext-command
(throw 'eshell-external
(eshell-external-command ext-command orig-args))
args)))