ambrevar/shell: Rename cmd<-> to cmd- and :<> to :-.
parent
9d4f5d39cd
commit
36f48bd50b
|
@ -222,29 +222,29 @@ Example:
|
|||
(when last-result-stream
|
||||
(list :input last-result-stream)))))))))
|
||||
|
||||
(export-always 'cmd<->)
|
||||
(defun cmd<-> (&rest args)
|
||||
"Call `:<>'-separated commands in args, passing the result of one onto the next.
|
||||
(export-always 'cmd-)
|
||||
(defun cmd- (&rest args)
|
||||
"Call `:-'-separated commands in args, passing the result of one onto the next.
|
||||
Example:
|
||||
|
||||
(cmd<-> \"cat\" \".../share/hunspell/en_GB-large.dic\"
|
||||
:<> \"sort\"
|
||||
:<> \"uniq\" \"-c\"
|
||||
:<> \"sort\" \"-nr\"
|
||||
:<> \"head\" \"-3\")"
|
||||
(apply #'%cmd<-> #'cmd:cmd args))
|
||||
(cmd- \"cat\" \".../share/hunspell/en_GB-large.dic\"
|
||||
:- \"sort\"
|
||||
:- \"uniq\" \"-c\"
|
||||
:- \"sort\" \"-nr\"
|
||||
:- \"head\" \"-3\")"
|
||||
(apply #'%cmd- #'cmd:cmd args))
|
||||
|
||||
(defun $cmd<-> (&rest args)
|
||||
"Like `cmd<->' but return a string."
|
||||
(apply #'%cmd<-> #'cmd:$cmd args))
|
||||
(defun $cmd- (&rest args)
|
||||
"Like `cmd-' but return a string."
|
||||
(apply #'%cmd- #'cmd:$cmd args))
|
||||
|
||||
(defun cmd<->& (&rest args)
|
||||
"Like `cmd<->' but return a `process-info' object."
|
||||
(apply #'%cmd<-> #'cmd:cmd& args))
|
||||
(defun cmd-& (&rest args)
|
||||
"Like `cmd-' but return a `process-info' object."
|
||||
(apply #'%cmd- #'cmd:cmd& args))
|
||||
|
||||
(defun cmd<->> (&rest args)
|
||||
"Like `cmd<->' but return a stream."
|
||||
(apply #'%cmd<-> #'cmd> args))
|
||||
(defun cmd-> (&rest args)
|
||||
"Like `cmd-' but return a stream."
|
||||
(apply #'%cmd- #'cmd> args))
|
||||
|
||||
(export-always 'tee)
|
||||
(defun tee (input-stream) ; TODO: Real `tee' with separate process.
|
||||
|
|
Loading…
Reference in New Issue