How to Add Autocomplete in Mac Terminal


macOS are shipped with ZSH Shell as the default shell, but you will see that autocomplete is enabled by default.

In order to turn on autocomplete in Terminal, follow the below steps,

  1. Open Terminal App on your Mac.
  2. Now run the below command.
  3. git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
  4. Once the download is complete, let's apply the changes to zsh shell.
    source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh 

Now if you try to type any builtin command or any text of the preview history you should get auto-suggestions on your Mac Terminal.

Turning on Auto-Suggestions on Mac Terminal

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap