(defun eshell/args (&rest args)
"Experiment with ARGS parsing."
(interactive)
(eshell-eval-using-options
"args" args
'((?a "all" nil show-all "show all things")
(?h "help" nil nil "show help message") ; nil nil lets me get usage on -h
(?n "number" t number "pick a number")
:show-usage
:usage "[OPTION]... [ARG]..."
)
(unless args
(setq args (list "."))) ; How doess eshell/ls work with no args?
(eshell-with-buffered-print
(eshell-buffered-print
Comment too long. Click here to view the full text.