Auto complete for already used command line commands?

To use auto-complete of already used command line command we just need to edit the following lines: