Não é um recurso ls , é um recurso bash e é descrito no
Seção "Correspondência de padrões" em bash (1) :
The special pattern characters have the following meanings:
*
Matches any string, including the null string. When the
globstarshell option is enabled, and*is used in a pathname expansion context, two adjacent*s used as a single pattern will match all files and zero or more directories and subdirectories. If followed by a/, two adjacent*s will match only directories and subdirectories.?
Matches any single character.
[...]
Matches any one of the enclosed characters. A pair of characters separated by a hyphen denotes a range expression; any character that falls between those two characters, inclusive, using the current locale's collating sequence and character set, is matched. If the first character following the
[is a!or a^then any character not enclosed is matched. The sorting order of characters in range expressions is determined by the current locale and the values of theLC_COLLATEorLC_ALLshell variables, if set. To obtain the traditional interpretation of range expressions, where[a-d]is equivalent to[abcd], set value of theLC_ALLshell variable toC, or enable theglobasciirangesshell option. A-may be matched by including it as the first or last character in the set. A]may be matched by including it as the first character in the set.
Seu entendimento também não está totalmente correto - ? significa qualquer
caractere, então a expressão x?[a-c]* corresponderia a xQcFoo.bar , xmabc e x1a , mas também xabc - o ponto é que {a,b,c} também pode ser a segunda letra, não apenas a terceira. A saída do comando ls x?[a-c]* será uma lista de arquivos que correspondem
x?[a-c]* padrão. Ou, se não houver tais arquivos, o shell não substituirá x?[a-c]* por nada, então ls tentará listar o arquivo literalmente denominado x?[a-c]* .