-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assign absolute/relative path to string variable in CLI #126
Comments
You're right, it looks like strings in general are not being handled very well. It is trying to assign a non-delimited string, something like this:
and the slashes are being interpreted as end-of-namelist tokens. This case does seem to work for me:
but I admit that it's not what one would like to see. ( I think overall it is going to be difficult to know the best way to communicate string delimiters inside of a shell command (if at all). But something a little more intuitive is needed here. |
Nested quotes also seem to work:
|
I see. I thought only of escaping the slashes inside the quotes. |
This reminds me on an inherent issue with namelists, where the default behavior is to write a strings without delimiters. For certain strings, such as a filepath, it will tend to produce a very flawed namelist. I drafted a proposal to address the issue, but it didn't generate very much interest. As for the issue here, I think it might be possible to change the behavior to be a bit more intuitive. Tokens in shell commands are often already assumed to be strings, to the point where putting delimiters around them is redundant. There would be some interesting special cases:
But if we defined our rules then it could at least approach something consistent with the shell's own syntax. |
It doesn't seem that the CLI supports the use of '/'.
Using
f90nml -v DIR='./path/to/dir' -v ODIR='/path/to/dir' input
will make DIR have the value '.', and ODIR empty.
Escaping doesn't work either.
The text was updated successfully, but these errors were encountered: