From 36f48bd50b348b2934745326d68db97509e60718 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 19 Jan 2021 12:21:27 +0100 Subject: [PATCH] ambrevar/shell: Rename cmd<-> to cmd- and :<> to :-. --- .../common-lisp/source/ambrevar/shell.lisp | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.local/share/common-lisp/source/ambrevar/shell.lisp b/.local/share/common-lisp/source/ambrevar/shell.lisp index 59cdbfd8..fb132144 100644 --- a/.local/share/common-lisp/source/ambrevar/shell.lisp +++ b/.local/share/common-lisp/source/ambrevar/shell.lisp @@ -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.