Understanding arguments to Siril scripts or commands

Nubi!!!

Using this guide :

https://free-astro.org/index.php/Siril:Commands

I’m trying to understand how Siril scripting parses the command line arguments.

Specifically I’m trying to cd to the core.wd location.

I have tried :

cd ~ (changes to Linux users home directory not Siril HOME)
cd core.wd
cd $core.wd
cd get core.wd

But none of these seem to change to the Siril HOME directory.

The guide I presented doesn’t mention how variables are used or how the command line arguments are parsed. I assume that guide reference is not official!!!

Hello.

As written at the top of this page:
See the new documentation website for the up-to-date list of commands for Siril 1.2 (stable) and Siril 1.3 (current development version). The reference for the older version 1.0 is available here.

There’s no way to do that. At startup, Siril starts in the home directory. That’s all. We cannot use variable in siril command line.

1 Like

Thanks for the reply.

If that’s a known limitation so be it

The cd command provides the ‘~’ char to return to the HOME directory how ever this HOME does not match the Siril HOME directory. What is the practical purpose of ‘~’?

If there are no variables in Siril command line what is the purpose of the get command? Seems to be values I can look at but not use?

Is there some use for the get command?

Yes. To know the status of preference variables. And with the set it is possible to update it.
So in fact you could change the cwd value with the set.

Well that is good for me because I am not a script and I can know the status of something but for the script what does it achieve to perform a get. Yes at some point in the script it will display some value but for what purpose, the script will not know that value and can never use it.

I really only see this being usefully used from the command line (when I want to see a value) and not in a script which can never know the value.

What I’m am asking is the capability for the script to be able to also know/use these values.

It would also be useful if the pathing used in the scripts was all relative to the Siril HOME directory instead of using …/process through the scripts.

I have tried using ~/process instead but that also fails as ~ is not the Siril HOME but some other place.

But looking at the code the only place where ~ is used is in/from the CD,LS.LOAD,REBAYER commands which is not really consistent with all other commands.

Well, you can have a look here:

it’s the system home, the user directory, siril works with a current working directory with no memory of previous locations

1 Like