-
Notifications
You must be signed in to change notification settings - Fork 513
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
Allow variable names to include dashes or spaces #60
Comments
Hey @denisidoro, I would like to pick this issue up. Need some more clarification here what is the requirement exactly. |
Thanks, @engrravijain! These should be valid arguments: foo, foo_bar, foo-bar and foo bar. Today, only the first two are considered valid. First, you need to change this regex: https://github.com/denisidoro/navi/blob/master/src/arg.sh#L3. Then, when assigning values, you need to replace spaces and dashes by underscores here, because foo-bar isn't a valid bash variable: https://github.com/denisidoro/navi/blob/master/src/main.sh#L41 |
Or another solution is to replace the dashes and spaces when reading the files. This way no other code would be modified. However, it would make the startup a little bit slower |
Ah, don't forget to start from the dev branch instead of master |
Got it. Thanks, Denisidoro. |
Based on #95 by @engrravijain Fixes #60
#60 names can include dashes or spaces
It's not evident that variables should only contain alphanumeric characters and underscores.
Using spaces and dashes would make variable references in scripts non trivial, though (eg "image name" would become "image_name").
The text was updated successfully, but these errors were encountered: