ambrevar/shell: Have `sh' and friends accept multiple arguments.
parent
344c1d78a6
commit
09a594a8fd
|
@ -104,19 +104,20 @@ Also see `*shell-command-flags*'.")
|
|||
*shell* *shell-command-flag* shell-command))
|
||||
|
||||
(export-always 'sh)
|
||||
(defun sh (shell-command)
|
||||
"Wrapper around `cmd:cmd' to execute SHELL-COMMAND in `*shell*'."
|
||||
(cmd:cmd (format-shell-command shell-command)))
|
||||
(defun sh (&rest shell-args)
|
||||
"Wrapper around `cmd:cmd' to execute SHELL-COMMAND in `*shell*'.
|
||||
SHELL-ARGS are strings that are concatenated before being sent to the shell."
|
||||
(cmd:cmd (format-shell-command (str:join "" shell-args))))
|
||||
|
||||
(export-always 'sh&)
|
||||
(defun sh& (shell-command)
|
||||
"Wrapper around `cmd:cmd&' to execute SHELL-COMMAND in `*shell*'."
|
||||
(cmd:cmd& (format-shell-command shell-command)))
|
||||
(defun sh& (&rest shell-args)
|
||||
"Same as `sh' but around `cmd:cmd&'"
|
||||
(cmd:cmd& (format-shell-command (str:join "" shell-args))))
|
||||
|
||||
(export-always '$sh)
|
||||
(defun $sh (shell-command)
|
||||
"Wrapper around `cmd:$cmd' to execute SHELL-COMMAND in `*shell*'."
|
||||
(cmd:$cmd (format-shell-command shell-command)))
|
||||
(defun $sh (&rest shell-args)
|
||||
"Same as `sh' but around `cmd:$cmd'"
|
||||
(cmd:$cmd (format-shell-command (str:join "" shell-args))))
|
||||
|
||||
(export-always 'cmd&)
|
||||
(defun cmd& (cmd) ; TODO: Support (cmd &rest args) lambda list.
|
||||
|
|
Loading…
Reference in New Issue