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

Parameter expansion of default values is not following POSIX #19

Open
D-Brox opened this issue May 24, 2024 · 5 comments
Open

Parameter expansion of default values is not following POSIX #19

D-Brox opened this issue May 24, 2024 · 5 comments

Comments

@D-Brox
Copy link
Contributor

D-Brox commented May 24, 2024

The syntax ${variable:default} is not one of the 8 valid cases described on the POSIX specifications:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

@de-vri-es
Copy link
Contributor

That's true. This crate is "shell-like" substitution. It does not aim to be POSIX compatible.

@D-Brox
Copy link
Contributor Author

D-Brox commented May 24, 2024

True, it's shell-like, but it would still be desirable if at least ${variable:-default} was also valid.

@de-vri-es
Copy link
Contributor

I'm sorry, but this has never been a goal of the library. Being compatible with POSIX is much more complicated than what this crate aims to be.

@D-Brox
Copy link
Contributor Author

D-Brox commented May 24, 2024

No problem, I can work around this.

Can you take a look at #18 later? It has both an enhancement (permissive and partial substitution modes) and a fix for nested substitutions.

@de-vri-es
Copy link
Contributor

Yeah. I've been busy in a move lately, but I will try to get to it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants