How to get a terminal general auto-complete function?
The completion function is neither coming from any Terminal application or the OS on which you work: MacOS X, Linux…

This function is provided by your shell. To check which one is providing you the completion function you like, just get which shell you are using on Linux with:

echo ${SHELL}


Then change your login shell on MacOS X with:

chsh -s /bin/my_preferred_shell


to use the one which is performing the completion function you want.

Check that this shell exists and is executable, and read the documentation of chsh:

ls -ld /bin/my_preferred_shell

man chsh


To test it without risk, don't restart your session, just open a new Terminal. In case of error, you will be able to run chsh once more.