Search code examples
schemegimp

GIMP: test.scm gets "unbound variable" error when run


When I run this C:\Users\dev\.gimp-2.8\scripts\test.scm script:

(define (test pattern))

With this command in Windows PowerShell:

gimp-2.8 -i -b '(test "*.png")' -b '(gimp-quit 0)'

I get this error:

batch command experienced an execution error:
Error: ( : 1) eval: unbound variable: *.png

(Type any character to close this window)

What am I doing wrong?


Solution

  • With a hint from @souser12345, the problem turns out to be with the command line. Surrounding the *.png with grave accents like this:

    gimp-2.8 -i -b '(test `*.png`)' -b '(gimp-quit 0)'
    

    will get this output:

    batch command executed successfully
    (Type any character to close this window)