Hi Johniak,
Remember that the ' ' (space) character is an item delimiter, so in your case the @{-customadd 1,2} will be separated as two different items '@{-customadd' and '1,2}'.
That's why you have the message :
[gmic] *** Error in ./ *** Unknown filename '1,2}'.
The solution is to add quotes around. But, the difficulty when you start to deal with spaces, and quotes and things like this, is that the bash does its own substitution, so when calling gmic from the command line, you need to take care of all these possible substitution, and it can become very hard to make it working.
In your case, the best solution would be to write your function into a command file, to test it :
foo :
-echo @{-customadd" "1,2} # Just added double quotes around the spaces to make it as a single item.
then,
should work. It is recommended to test this kind of 'complex' stuffs in a custom function instead of trying to write it directly in a shell, to avoid headaches
![Smile :)](./images/smilies/icon_smile.gif)