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

No way to turn off variable interpolation or other advanced features #7

Open
haltman-at opened this issue Feb 1, 2023 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@haltman-at
Copy link

You can kind of turn off variable interpolation by passing x => "$" + x for env, but not really, because then "${THING}" will get turned into "$THING" instead of remaining as "${THING}".

Also, it would be nice to have a way to turn off things like operator, comment, and glob handling as well, and just treat these as ordinary strings. (Glob handling isn't even documented at all, and so is a potential landmine for users who don't read the code...)

Thanks!

@ljharb
Copy link
Owner

ljharb commented Feb 1, 2023

Are there any shells where these things are off?

@haltman-at
Copy link
Author

No, but shell-quote handling is useful outside of the context of shells proper, in contexts where these things don't make sense.

@ljharb
Copy link
Owner

ljharb commented Feb 1, 2023

What sort of contexts? I'm not sure it makes sense to add complexity to a package called "shell quote" for non-shell usage.

@haltman-at
Copy link
Author

haltman-at commented Feb 2, 2023

I mean basically in our context what's going on is we have something that provides a shell-like interface for commands, but doesn't have anywhere near the power of a real shell, such that attempting to handle operators, etc, doesn't make sense, as we won't be able to do anything with them. But we want to make sure that the user can use quotes or backslashes to include spaces in things, etc.

@ljharb
Copy link
Owner

ljharb commented Feb 2, 2023

Does that mean you don't even want to parse them, as opposed to failing loudly when they try to use them?

@ljharb ljharb added enhancement New feature or request question Further information is requested labels Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants