Incidencia #40711

Numeric brace expansion containing parameter

Abrir Fecha: 2020-09-06 12:03 Última actualización: 2023-09-15 00:21

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Hito:
(Ninguno)
Prioridad:
3
Gravedad:
3
Resolución:
Ninguno
Fichero:
Ninguno
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

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...)

Ticket History (2/2 Histories)

2020-09-06 12:03 Updated by: magicant
  • New Ticket "Numeric brace expansion containing parameter" created
2023-09-15 00:21 Updated by: magicant
  • Estado Update from Open to Cerrado
Comentario

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar