Skip to content
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

Offer some way for parser to deal with spaces in file paths #412

Open
jhenin opened this issue Jul 28, 2021 · 2 comments
Open

Offer some way for parser to deal with spaces in file paths #412

jhenin opened this issue Jul 28, 2021 · 2 comments
Labels
non-urgent Long-term improvement parser Only affects the input parser

Comments

@jhenin
Copy link
Member

jhenin commented Jul 28, 2021

This is particularly relevant in Windows, where user directories often have spaces in them (maybe OSX as well?). Right now, a path with spaces (say in refPositionsFile) will be detected as several words and trigger an error.

Classic solutions to this are:

  1. escaping spaces
  2. double quotes

To me both options seem fine. Ideally we'd support both. But of course this is still more work for the parser to do.

@jhenin jhenin added user-visible parser Only affects the input parser labels Jul 28, 2021
@giacomofiorin giacomofiorin added the non-urgent Long-term improvement label Feb 9, 2022
@giacomofiorin
Copy link
Member

Alternatively, using environment variables may be also useful in other scenarios. Something like this:

  refPositionFile  getenv(COMMON_DIR)/coordinates.xyz

which could be confined just to file path values. In principle I'm not against using variables for other values as well, it's just just more difficult to handle at that point.

The main reason why I'm not a big fan of quoting mechanisms specifically for this purpose is that their syntax differs depending on which shell you use (e.g. Bash or PowerShell).

@jhenin
Copy link
Member Author

jhenin commented Feb 9, 2024

Proposed solution: make the Dashboard detect spaces in paths it generates, and avoid them by making the paths relative, if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-urgent Long-term improvement parser Only affects the input parser
Projects
None yet
Development

No branches or pull requests

2 participants