'[3-4]' expands as if I had asked for '[0-4]'. This occurs with letters as well:

file_0  file_1  file_2  file_3  file_a  file_b  file_c

ls file_[2-3]
file_0  file_1  file_2  file_3

ls file_[b-c]
file_0  file_1  file_2  file_3  file_a  file_b  file_c

Enumerations work as expected:

ls file_[2bc]
file_2 file_b   file_c

Is this a known bug or have I suddenly been teleported to an alternate universe? Do you see this on your system (csh or tcsh)? Is it fixed in tcsh 6.22 ? Thanks!

tcsh --version
tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec

macOS 10.14.4
  • What happens if you start tcsh without reading .tcshrc and .login ?
    – fd0
    Mar 22, 2021 at 12:28
  • @fd0 Most probably the same. I tried on Big Sur, same behvaviour. And I haven't used tcsh/csh on macOS at all.
    – nohillside
    Mar 22, 2021 at 12:34

1 Answer 1


Same happens on Big Sur. But the standard tcsh in macOS hasn't changed for years, you can install tcsh 6.22.03 (Astron) 2020-11-18 via Homebrew.

% ls
foo_1   foo_2   foo_3   x
% echo foo_[1-4]
foo_1 foo_2 foo_3
% echo foo_[2-4]
foo_2 foo_3
% tcsh --version
tcsh 6.22.03 (Astron) 2020-11-18 (unknown-apple-darwin) options wide,nls,dl,al,kan,sm,rh,color,filec

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .