-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
As discussed with @willend, I just noticed the following a bit unfortunate issue, which I encountered while trying to put an NCrystal cfg-string with semicolons into a string parameter of mcrun:
$> mcrun -c NCrystal_example.instr sample_cfg='Al_sg225.ncmat;density=10x'
It actually results in sample_cfg="Al_sg225.ncmat"
and not the expected sample_cfg="Al_sg225.ncmat;density=10x"
.
It works with a backslash in front of the semicolon:
$> mcrun -c NCrystal_example.instr sample_cfg='Al_sg225.ncmat\;density=10x'
This was noticed in the context of a jupyter notebook, where I was trying to:
!mcrun sample_cfg={shlex.quote(mycfgstr)}
The initial theory from @willend is that this is related to moving the arguments through BASH (certainly sounds like something BASH would do!), and that we need to double-check arguments passed via mcgui as well.