You actually don't even need string-append here. The following should
also work:
(capture (docker inspect ,str))
Best wishes,
-utz
Unquoting worked! I spent so much time trying different variations and this
worked:
(capture ,(string-append "docker inspect " str)))
Thanks.
Brandon
You're right. I confused characters , with ` during typing in the editor.
Sorry for misunderstanding at my part.
Am Fr., 10. März 2023 um 20:36 Uhr schrieb :
> >
> >> (capture ,(string-append "docker inspect " str)))
> > doesn't work because of the same reason that you expressed.
> > You would ge
On Fri, 10 Mar 2023 20:15:13 +0300 Nevroz Arslan wrote:
>> (capture ,(string-append "docker inspect " str)))
> doesn't work because of the same reason that you expressed.
> You would get "quasiquote not found" from the shell.
Actually, no:
$ csi -R shell -p '(capture ,(string-append "echo"
(capture ,(string-append "docker inspect " str)))
doesn't work because of the same reason that you expressed.
You would get "quasiquote not found" from the shell.
Yes, it does, and no, you don't get "quasiquote not found" from this.
Hi utz and Brandon,
> (capture ,(string-append "docker inspect " str)))
doesn't work because of the same reason that you expressed.
You would get "quasiquote not found" from the shell.
As a workaround, execute procedure might be used straightly.
(define (inspect str)
(execute (list (string-appe
Hi Brandon,
'capture' and its friends 'run' and 'run*' are macros that treat their
arguments differently from what you would expect from a regular procedure.
Looking at the documentation of '(run COMMAND ...)', you will find that
COMMAND is also implicitly quasiquoted so subexpressions may
Hi Brandon,
What you are doing looks right to me. What exactly is the error message?
"string-append" is automaticalli imported, so it should be available
without any imports. Perhaps you redifined "string-append" elsewhere in
your code? If not, there may me a problem with your CHICKEN installatio
I'm trying to learn Chicken and having issues. I'm trying to create a function
that takes a docker container name and runs "docker inspect [container]."
This works:
(define test (capture "docker inspect hello-world"))
This works:
(define (str-concat str)
(string-append "docker inspect " str))
T