When I am running on the command line using iTerm, it is in a different mode than I'm used to, shown in the images below.

[![enter image description here](https://i.stack.imgur.com/z2tgH.jpg)](https://i.stack.imgur.com/z2tgH.jpg)

[![enter image description here](https://i.stack.imgur.com/Dmb4V.jpg)](https://i.stack.imgur.com/Dmb4V.jpg)

When I try to type a command it shows all the previous variations of that command. When I try to run a commandit often adds other options to the command line. How do I get out of this mode?