recently I saw a youtube video where somebody used the terminal and when he used ls or cd, this popup came up: 
Does anybody know how to get this? I want to use it also.
That's a third-party terminal emulator called "iTerm2." See the screenshot in this thread: https://stackoverflow.com/questions/44866682/how-to-enable-autocomplete-in-iterm2/50283873