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

Numeric brace expansion containing parameter #31

Open
magicant opened this issue Sep 14, 2023 · 0 comments
Open

Numeric brace expansion containing parameter #31

magicant opened this issue Sep 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@magicant
Copy link
Owner

(Issue migrated from https://osdn.net/projects/yash/ticket/40711)

We now support expansion like this:

$ set -o braceexpand
$ d=. o=1
$ echo {1${d}${d}3} {${o}..3}
1 2 3 1 2 3

This may possibly be a cause of unexpected expansion, for example, like echo {${var}} where var='1..3'.

On the other hand, it would still be useful if the range of numeric brace expansion could be specified by parameters: echo {${from}..${to}}

So my current opinion is that the braces and dots must be literal (not from parameter expansion) but the numbers can be a parameter.

(This behavior is different from that of other shells, though...)

@magicant magicant added the enhancement New feature or request label Sep 14, 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
Projects
None yet
Development

No branches or pull requests

1 participant