I need to be able to list files as specified in a variable, like in this example:

```bsh
X="myfile.txt"
$ ls ${X}

```

Regrettably, some people use spaces in filenames, so this could be the case:

```bsh
X="my file.txt"

```

which solvable with `ls "${X}"`

However, this could also happen:

```bsh
X="my file.*"

```

which would break because wildcards don't expand within double quotes.

Is there anything that could work in all cases?

**EDIT**

Declaring `X` as an array, as in

```bsh
X=("my file."*)
ls "$X[@]"

```

is not sufficient, because it expands the wildcard at the moment of declaration. I need it to expand when it is used by `ls`.