Using zsh, if I try tab completion of the following command ls /proc/self/fd/
then I see the following:
files
0@ 1@ 10@ 11@ 12@ 13 2@ 3
However, when I press enter (without completing) I see:
> ls /proc/self/fd/
0 1 2 3
If I list the file descriptors for the current shell I get something different:
> ls /proc/$$/fd/
0 1 10 2
Why are these three results different?