Search code examples
fish

Does fish shell support alphabetic range expansion?


In bash you can do this

echo {a..d}

and it will print

a b c d

How to do that in fish shell?


What I tried:

echo {a..d}
a..d

echo {a-d}
a-d

echo [a-d]
[a-d]

echo (seq 5)[a-d]
fish: Invalid index value
echo (seq 5)[a-d]
         ^

echo (seq 5)[a..d]
fish: Invalid index value
echo (seq 5)[a..d]
             ^

Does fish support alphabetic expansion at all?


Solution

  • Does fish support alphabetic expansion at all?

    No.

    Use normal brace expansion - {a,b,c,d}.